Widgets are configurable elements used to dynamically build sections of a WordPress theme.

learn more… | top users | synonyms (2)

1
vote
1answer
927 views

AJAX Contact Form Issue

I created a contact form for my sidebar that is working perfectly in Chrome but not in IE or FF. I've been staring at it for hours and can't find out what I did wrong. I'm not getting any errors ...
1
vote
3answers
644 views

Including PHP files doesn't work outside of Localhost

I have a bunch of widgets that I load from php files, like so: I added a PHP CODE widget and inside wrote: <?php include '/wp-content/themes/myTheme/parts/block1.php'; ?> This worked well on ...
1
vote
1answer
826 views

Script to remove all inactive widgets?

I've been working with widgets a lot lately and have amassed a ton of widgets in the inactive widgets collection. Can someone share a script or plugin that will remove all inactive widgets from the ...
1
vote
1answer
259 views

How to remove Broken Link Checker widget from admin menu

I'm trying to clean up the Admin Dashboard widgets so that only the administrator level users can see the various meta boxes, but no matter what i've tried the Broken Link Checker widget will not go ...
1
vote
2answers
1k views

List a current posts' taxonomy terms in a widget in Wordpress

I would very much like to know if there is a widget that exists that would let me show the current page's associated taxonomy terms (preferably hierarchically) in a widget. For example, if the ...
1
vote
3answers
465 views

Widget “Save” resetting jQuery hidden fields

I have a widget plugin that I've created, that lists about 10 fieldsets. jQuery runs at the beginning and hides and fieldsets that have no values. There are also buttons that allow to "Add" and "...
1
vote
1answer
2k views

Missing argument 3 for wp_register_sidebar_widget()

I installed the Deprecated Calls plugin and it's telling me to change register_sidebar_widget() and register_widget_control(), essentially add wp_ first. I did but I'm getting Missing argument 3 for ...
1
vote
3answers
843 views

Subscribe2 widget with choosing categories?

Is it possible to specify the category people can choose to subscribe to in the Subscribe2 (Wordpress Plugin) widget?
1
vote
1answer
2k views

Can I create drag and drop widgets like iGoogle in WordPress?

I want to make something like iGoogle in WordPress, in which I can drag and drop the widgets. How could that be done in HTML 5?
1
vote
2answers
276 views

Widget code is not working on WordPress.com Hosted Blogs

I have developed a JavaScript widget which works fine when I embed it in any of my html pages. The code is something like this <script type="text/javascript" charset="utf-8"> var asset_host = ...
1
vote
2answers
43 views

List authors with posts in a category

I'm trying to create a custom widget to display contributing authors for the current category being viewed on a WordPress site. I have the following PHP code: <?php if (is_category()) { ?> // ...
1
vote
1answer
32 views

How to create Blog Post Specific Widget

I want to create widgets which will display based on post. I have considered the option of creating a widget post type using Advanced custom post type plugin and populate this widget while writing ...
1
vote
1answer
59 views

How to add #navbar to all page links?

I have several Wordpress websites with large images at their tops, using 2013 child theme. How to add #navbar anchor to all page links, so that the browser scrolls down a bit, when a user clicks a ...
1
vote
1answer
90 views

Remove rss widget title link

I'm looking to remove the link and icon from rss feed widget. Is there a way it can be done? Obviously I don't want to modify the core files. So desired output is: <h3 class="widget-title">RSS ...
1
vote
2answers
194 views

How to run PHP code in Text Widget with no plugin in WP 4.4

Before I had the following code in the function.php add_filter('widget_text','execute_php',100); function execute_php($html){ if(strpos($html,"<"."?php")!==false){ ob_start(); ...
1
vote
1answer
35 views

How to change plugin`s template (view) correctly?

I'm new to WordPress. So, I have installed a plugin to display recent posts (that's it: https://wordpress.org/plugins/flexible-posts-widget/). This plugin have a widget. And now I want to change ...
1
vote
1answer
183 views

Custom Widget Creating PHP Exception When Placed In Its Own PHP File

I have a custom plugin created and i have created a widget. At the moment this code is included in the base php file for the plugin and its working fine. I want to move the widget and all future ones ...
1
vote
1answer
94 views

Remove All Widgets from Sidebar

Does someone know a solution for this? I want to remove (not unregister) all widgets from a sidebar with a function.
1
vote
1answer
33 views

WordPress Plugins won't save

I have a WordPress website I just took over for a client so I don't have the ability to talk with the previous webmaster / the developer. The site is using a slightly modified version of the Subway ...
1
vote
1answer
71 views

How to check if widget has automatic title

Some default widgets has automatic titles. Is it possible to check if widget has automatic/inserted title using dynamic_sidebar_params filter?
1
vote
2answers
980 views

instance is empty in function widget()

I am working on a widget for my theme. If I do a print_r($insance) in the form function, the instance array is populated with the correct data. I have checked the database and the correct ...
1
vote
1answer
721 views

Embedded Videos (PB) - Not Available

I am using this link to create a wordpress website VIDEO At minute 53 the guy is using "Embedded Videos (PB)" widget in order to embedd a youtube video. (By the way he is using Page Builder). Problem ...
1
vote
2answers
3k views

How to get post ID of the current page/post inside a widget?

I'm trying hard to get the post ID of the current post/page inside a widget class but doesn't work, I know there's get_the_ID() and some other options but not a single works inside a widget. Here's my ...
1
vote
2answers
53 views

Display assigned terms with link

I want to display product assigned terms, wrapped in link/anchor MarkUp, in my sidebar on a page as a widget. I am not getting the correct tag URL. Code returns visited product URL instead of listed ...
1
vote
1answer
200 views

How to check if a widget has no title

I wanted so that my widget has the following structure: <div class="widget-area"> <h4 class="widget-title">Foo Bar</h4> <div class="widget-content">Blablablabla blabla</...
1
vote
1answer
61 views

I wrote my plugin. How to display the result of the plugin's function to sidebar (widget?)?

I wrote my plugin. How to display the result of the plugin's function to sidebar (widget?)? <? function register_form () { global $post; $test = "testesttest"; var_dump("testtest"); ...
1
vote
2answers
149 views

Hide default “Recent Comments” Widget if there are no comments yet

Is there a way to hide the widget completely if there are no comments yet? I was thinking about maybe adding a php function to my functions.php file - is that a possible way? If so, can someone ...
1
vote
1answer
33 views

Uses Cases for the Calendar Widget

So I've looked at several themes and visited several theme dev sites and i'm confused about the "purpose" of the WordPress Calendar Widget. So it states it is... A calendar of your site’s Posts ...
1
vote
2answers
1k views

Override custom menu widget

I would like to override some mark-up and css (like <div class="soma_container"><ul class=""></ul></div>)styling on a chosen custom menu widget. How would I do that? Should be ...
1
vote
1answer
172 views

Hide all Dashboard Widgets (not remove)

Is there a to hide all dashboard widgets, not remove them? I want my widget to be the first widget but according to the docs there's no way to specify where your widget shows up since it's all "core", ...
1
vote
1answer
61 views

Why use dynamic_sidebar() conditionally?

In the codex example of displaying sidebars, what is the significance of the conditional wrapping around the call to dynamic_sidebar? Why do this: <?php if ( dynamic_sidebar('...
1
vote
1answer
114 views

How to modify the default Wordpress 'Pages' widget to have titles on the anchor tags?

So basically, the 'Pages' widget just prints out a list of all pages names as links (as you all probably know). Although, these anchor tags do not have any titles, and that is frowned upon in the SEO ...
1
vote
1answer
513 views

Displaying a variable stored in functions.php inside widget

I'm trying to display a variable that is stored inside my functions.php file - for the sake of the question this variable is stored as $test = 'test';. When i use echo $test inside page.php, header....
1
vote
3answers
369 views

right_now_content_table_end function not working?

I noticed recently my custom counts for custom post types are not showing on the dashboard. Im using this function: right_now_content_table_end It worked well before, Im not sure when it stopped ...
1
vote
1answer
5k views

Create Image Uploader for Widget

I found this post// Use Media upload in custom widget on wordpress 3.5 I'm not experienced in any of this so I pretty much just copied the code he provided into my own functions.php file. I uploaded ...
1
vote
1answer
259 views

wp_register_sidebar_widget() disappered my Widgets submenu - what am I doing wrong?

Working on a theme made by someone else as an official duty. At first it's causing error in the wp-admin Widgets page — not working at all. Then the first thought came to my mind was debugging......
1
vote
2answers
135 views

Dynamically Register Sidebars For Each Top Level Page

I have a small website that wants a different sidebar for each page containing blocks of text, blocks of images, and blocks of links, etc. What I'm trying to do is register a sidebar for each top ...
1
vote
1answer
2k views

Widgets menu does not appear under “Appearance” in dashboard

I am developing a WordPress theme, but am stuck on widgetizing my theme. I have followed several tutorials but still cannot get it to work. My widgets menu does not appear under Appearance in my ...
1
vote
1answer
252 views

Display single widget

I've created a simple one-off widget to let the admin change some copy on the home page, but the widget isn't showing its contents. On the home page, I have this code: <?php the_widget('...
1
vote
1answer
190 views

How do i export the HTML from text widgets?

I placed HTML in several text widgets which where lost after i deleted all inactive widgets and changed themes but i have found the data in the tables. The only problem, its mixed in with all this ...
1
vote
1answer
4k views

Calling widget via function in themes files (hard code)

Finally I finished to write my widget, and now want to call it using function inside themes php files. My widget looks like this: function reg_custom_widget() { register_widget('...
1
vote
1answer
1k views

How to add class on Widget Title

This is an example of register sidebar function from codex. My focus is on the before_title argument. What i want is to add a class to the title(<h3>). From my widget code or may be pass the ...
1
vote
4answers
1k views

Widget items disappearing

if ( function_exists('register_sidebar') ) register_sidebar(array( "name" => "Top Widget Area", "id" => "topWidgetArea-$i", )); I just create a new sidebar with this. I'...
1
vote
1answer
353 views

Setting up widgets in wordpress with a unique ID for the after_title argument

I try to get the collapsible-widget-area plugin so that every widget it creates inside the collapsible area has a unique id <div> after its title. function get_args() { $this->args = ...
1
vote
2answers
269 views

Excluding specific widgets from default sidebar class

I have two sidebars using the register_sidebars function that display each widget as a list item with a class of .box: <?php if(function_exists('register_sidebars')){ register_sidebars(2, array( ...
1
vote
1answer
854 views

How to Validate Widget Input

I have been working with widgets and widgets API. I see that the widget form is rendered and processed through widget() function. I can write validation logic inside the widget() function. I will ...
1
vote
1answer
1k views

Run JS after widget settings are saved?

I've written a small widget that uses JS for setting up some tabs in the settings panel. Is there a way to re-trigger the tab JS when the widget is done saving? Looking at the WP JS source it doesn't ...
1
vote
1answer
2k views

How to truncate titles in Recent Posts widget?

I read the thread here about this... http://wordpress.org/support/topic/truncate-titles-in-recent-posts-widget?replies=8 but the suggested solution didn't work, because I wasn't sure what to do with ...
1
vote
1answer
125 views

How do I add a widget from an Android phone?

Currently my only internet access is via my phone, and I need to add a widget to a Wordpress site. This requires dragging and dropping the widget to the sidebar, which I cannot do via the web browser ...
1
vote
1answer
417 views

How to get “Widget Logic” plugin's input value in a custom widget code (to display on the Widget admin page)

I've got the "Widget Logic" plugin installed. I have created my own widget called "Buzz". I have a sidebar with multiple instances of my custom widget "Buzz". Now, on the Widgets admin page when a ...