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

learn more… | top users | synonyms (1)

0
votes
2answers
30 views

Display widget outside sidebar?

I want to display a widget outside the sidebar, but I can't get my code to work. The theme name is radius-primary-sidebar and my widget id is text-20 (according to the html in the admin page. See ...
0
votes
1answer
13 views

wp_dropdown_pages in widget form

I have a small quirk somewhere in my widget form. Upon saving the widget instance, the form refreshes with the wrong selected 'page_id' from the wp_dropdown_pages input. If I refresh the widgets page, ...
1
vote
1answer
17 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", ...
0
votes
1answer
31 views

Wordpress widget title coding

I have a problem with wordpress widget titles, some widgets are not affected by theme custom encoding. Here is the codes; function ecce_widget_title($title){ if( empty( $title ) ) return ' '; else ...
-5
votes
0answers
18 views

I have a small favor to ask - Would you please do a small test for me? Takes 1 min! [closed]

What I'm asking as a favor is that would someone take a quick look at my page http://raekwon.rocksolidpromotion.com/discs-baby and see if the iTunes widget on my wordpress site shows your local ...
-1
votes
0answers
28 views

WooCommerce: Product price filter not showing up [closed]

I'm trying to add two widgets (filter price and navigation layer) to my sidebar but they are not showing up. sidebar.php <aside id="sidebar"> <?php if ( is_active_sidebar( 'sidebar-1' ) ...
0
votes
0answers
28 views

How can I add widgets to specific post

Some of my post are longer than others. On those post I want to display more widgets for social media and such to fill in space, as well as to gain more exposure. I know there are plugins but I ...
4
votes
2answers
100 views
+100

Can I display the widget admin in the page admin?

I would like to show the 'Appearance -> Widgets' menu underneath the text field in 'Pages -> new/edit'. Is it possible to take one part of the admin and show it elsewhere? Reading some of the ...
0
votes
0answers
20 views

Special characters showing in fallback font

I have created a widget that displays some text using a custom font imported with CSS @font-face. The font have support for scandinavian characters åäö, but when I display these characters in my ...
0
votes
3answers
21 views

Pass widget variable to external function

I am working on a custom widget which displays posts from a selected taxonomy (category or tag). This widget contains a textbox which the user enters an ID of a taxonomy (category or tag) to exclude ...
1
vote
2answers
36 views

Can I remove a widget area without editing code?

I am dealing with a Wordpress setup which has 2 widget areas. One seems to be breaking the page, and I want to remove it. Here is the screenshot of my widget setup How can I remove the Main ...
1
vote
0answers
9 views

Widget on the right side of the page overlaps with the left side

I added the mailchimp widget to the right column of my blog. But for some reason, it overlaps with the main content of the blog. Here is a screenshot of what happens Would anyone know why this ...
0
votes
0answers
23 views

What's the policy for building a theme that doesn't support widgets/menus?

I'm developing a minimalistic theme, and my plan is not to include menus or widgets in it. The Theme Review page on wordpress.org states: Whether implementing required, recommended, or optional ...
1
vote
1answer
17 views

Extending WP_Widget throws error when Monster Widget used

I wanted to override the output for the core Recent Comments Widget. I extended WP_Widget_Recent_Comments made the changes needed and it displays exactly how I want. However, I have now tested the ...
-1
votes
0answers
24 views

Custom Menu's don't register when in widgets

I'm hoping someone can point me in the right direction. The site I'm working on has multiple custom menus created that I'm trying to add onclick functionality to. I went ahead and installed the ...
3
votes
0answers
49 views

Prevent second widget activation

Is there a way to "remove the widget from available widgets" after you've activated it once on some area? The idea is to allow user to activate only one instance of it.
0
votes
1answer
25 views

Apply code for all else first block

I have this code for sidebar in Wordpress :- register_sidebar(array( 'name' => 'Main sidebar', 'description' => 'main sidebar.', 'before_widget' => '<div id="blocks" class="siderbar ...
0
votes
1answer
27 views

Widget checkbox array empty on update function

I have a widget that is not passing checkbox state to $new_instance, specifically $instance[ 'posts' ]; if I dump $new_instance in the update function it is empty? All the other instance variables are ...
0
votes
0answers
17 views

Restore Theme based sidebars after migration

I migrated a site with the Cosily theme using BackupBuddy. I never had issues before and the clones were always flawless. Now I had to do it manually and some urls were not adjusted properly. I ...
1
vote
1answer
49 views

Widget options get

How to get widget options? I've tried like this, like seen in the other question "Using widget options outside of the widget": $w=get_option('widget_wp_mywidget'); $one=$w[2]["myval"]; ...
0
votes
1answer
34 views

Insert to wp_footer if widget is found in the sidebar

I trying to insert a code into wp_footer whether the widget is present or not in the sidebar. How to avoid the unnecessary code in the footer? Add the code only if widget is present the sidebar. ...
-1
votes
0answers
13 views

Get widget options outside widget

I'm basically looking to achieve the same as this guy. I want to conditionally load stylesheets inside wp_enqueue_scripts based on a particular option for each widget. For instance; on page 1 I have a ...
0
votes
2answers
28 views

is_active-sidebar loop

So I have 4 widgets which is in large-3 columns, when they're not active I place a placeholder as user guide so the user would know where to put what. I did manage to work out the is_active but it ...
-1
votes
0answers
17 views

How do i make a tab menu consisting of sidebars or widget areas NOT just widgets

or alternatively a tab menu where each item is a display of more than one widget, I was wondering how i should go about achieving this effect with wordpress, i currently have a number of ...
2
votes
1answer
38 views

List sidebars on a page

I need to generate a list of sidebars on a given page. I know how to list all sidebars that have been registered, and all sidebars that have been registered that have active widgets, but I do not know ...
0
votes
1answer
28 views

Random sidebar/widget background

Does anyone have a clever idea to get a random/changing background for just the widget sidebar?
0
votes
1answer
39 views

how to use get_field_name in external ajax handler

I am loading new form fields from Ajax when I click on radio button in my custom widget. In Ajax callback handler, I need to use get_field_name and get_field_id widget class methods. get_field_name ...
0
votes
0answers
12 views

How to add rewrite rules adjust to permalink structure

I want to create an Archive Widget for Custom Post Type (product). I let my client to change permalink structure by himself. So, my question is: how to add rewrite rules adjust to permalink ...
1
vote
1answer
25 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 ( ...
0
votes
0answers
50 views

Using javascript on the new widget preview / customizer page

Widget customizer has just become core in WordPress 3.9. I'm trying out the beta version hoping to get widgets working on the customize screen in the same way I have on the ordinary widgets page. Some ...
1
vote
1answer
36 views

How to add a text widget during theme activation

I'm trying to add a text widget with the title and text set, to two custom sidebars in my custom theme. But, I can't find a clear walkthrough of how to do it. I've seen bits of code here and there, ...
0
votes
1answer
44 views

Use of apply_filter in plugin/widget class

I'm having difficulties to find out what I'm doing wrong in my use of apply_filter() in a widget class. Here's some samples of my code: class Byad_CountDown_Widget extends WP_Widget { function ...
6
votes
3answers
173 views

Author template, filter sidebar widgets by author?

I'd like to be able to filter my sidebar widgets (tag cloud, category, archive) to only show those tags/categories/months that apply to a given author on the author template. What is the correct way ...
0
votes
0answers
20 views

Customize Dashboard Widgets Area for the Client?

To avoid the client messing up the website I have already customized other parts of the admin backend, now for the dashboard widgets area. I don’t want to block access but rather I want to give the ...
0
votes
0answers
16 views

Disable wordpress widget automatically on error

I have a small widget which gets some information from other websites. Now, at times it is possible that these other websites are not available. Is it possible to disable or hide a widget ...
1
vote
1answer
24 views

How can I whitelist only specific shortcodes for processing in text widgets?

I know that I can use the following filters to enable processing of shortcodes in Text Widgets: add_filter( 'widget_text', 'shortcode_unautop'); add_filter( 'widget_text', 'do_shortcode'); How can ...
0
votes
0answers
33 views

Hide Password Protected pages in Recent posts

I have the following lines of code in my functions.php file: // Filter to hide protected posts function exclude_protected($where) { global $wpdb; return $where .= " AND ...
0
votes
0answers
20 views

wp_register_sidebar_widget in loop within a plugin?

I'm trying to dynamically create widgets based on a posts from a post type. The code is as below. This function is pulled from my plugin class: public function initWidgets() { // Config ...
0
votes
1answer
43 views

Correct code to use php in text widget

This code is used to display php inside a text widget add_filter('widget_text','execute_php',100); function execute_php($html){ if(strpos($html,"<"."?php")!==false){ ...
0
votes
1answer
16 views

What's the right way to share data between widgets?

I've got a few custom widgets in my site, which I'm targeting to specific tags. There may be a case where there may be an overlap in widget targeting, and the desirable behaviour may be to only show ...
0
votes
1answer
18 views

if is within sidebar [duplicate]

I have several sidebars (more then 1 on a page) and I would like to set different image sizes to widgets, depending in which sidebar they are located. I tried if( ! dynamic_sidebar('my-sidebar') ) : ...
0
votes
1answer
24 views

Creating a Playlist of Widgets

I'm trying to create a specialized theme that would enable users to show a playlist of widgets in their sidebar. By playlist, I mean that each widget in the sidebar would follow a specific schedule. ...
0
votes
1answer
60 views

Add custom class to a tags [closed]

I want to create a plugin that adds specific class to all a tags.
2
votes
1answer
44 views

Tips for targeting widget dragable for WP Pointer on widgets.php page

I'm updating a widget plugin I wrote called Feature Me and am adding in WordPress pointers for first time users to help them find the widget after installing the plugin. However, I have come across a ...
0
votes
1answer
31 views

Insert custom content before widget title/after widget opening tag

I am trying to target a widget with a specific class, and place something directly after the opening tag or before the widget title. This: <widget> <h3>Title</h3> <p>Some ...
0
votes
2answers
24 views

Can I add a widget to the <head> of my site?

I need to add a small bit of JavaScript to the <head> section of my site (on every page). I thought Widgets would cover this but I am only able to add widgets to the sidebar and nowhere else. ...
0
votes
0answers
19 views

Search form is not working in live site

I have installed a wordpress theme called suffusion. Search widget is not working in this theme. It shows nothing found always. I have search.php as below. It is working in local machine <?php ...
0
votes
0answers
43 views

how to override menu widget?

I would like to customize the menu widget in sense to add some classes which would make it responsive. How do I override the default widget for menus? I use a custom template which supports bootstrap ...
0
votes
2answers
120 views

Post-specific widgets in Wordpress 'Twenty Fourteen' theme

Using Wordpress 3.8.1 with 'Twenty Fourteen' theme I'd like to arrange my post in such a way that it's main contents go to main (center) column while galleries, attached files and links pertaining to ...
0
votes
1answer
54 views

How to display only some widgets of a sidebar?

I would like to break up a sidebar over three containers. Each container should hold up to three widgets of the sidebar. Therefore, I need to find the HTML for only the widgets 0 to 2, 3 to 5 and 6 to ...