Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
30 views

Why the dynamic_sidebar() call is putted into an ul tag?

I am pretty new in WordPress development and I have the following doubt about how the sidebar are putted into a WordPress theme. Looking into the official documentation: ...
1
vote
2answers
64 views

Cannot save widgets in custom sidebars

I'm working on a child theme of the Toolset Bootstrap Theme. I need to create a custom sidebar, so I registered the new sidebar in my child theme's function.php file: function ...
1
vote
1answer
39 views

Insert Widget option into mark-up with register_sidebar

I have added a custom field to my all widgets in my theme, called "custom-title". I have managed to save the field into the database for each widget, like so: s:12:"custom-title";s:17:"HELLO TEST ...
0
votes
1answer
20 views

Is there a way to dump all registered sidebar/widget?

I need to know the properties of sidebar and widgets I've added, is there a way to dump those? Thanks.
0
votes
0answers
28 views

Widget Areas Still Appearing in WP ADMIN When They Shouldn't

I had a bunch of "Widget Areas" registered for my theme. I removed a few and added a few. The ones which I removed, I deleted the code which is hooked on widgets_init for registering the sidebars. I ...
0
votes
1answer
41 views

$before/after_widget/title not displaying anything

I have built a custom widget with this code: class rfw_dock extends WP_Widget { function __construct() { parent::__construct('rfw_dock', __('TITLE'), array( 'description' => __( ...
0
votes
0answers
17 views

How to select widgets top bottom?

i'm add widgets in functions.php: register_sidebar(array('name'=>'sidebar1')); register_sidebar(array('name'=>'sidebar2')); in index.php how to code: set options sidebar1 or sidebar2 to top ...
0
votes
1answer
52 views

unregister_sidebar() in stand-alone theme not working

With this StackOverflow Q&A I can't make the unregister_sidebar() work for me. Scenario I have developed a theme using a sidebar area, where I've used a Widget. But I don't want the 'Editor' to ...
0
votes
0answers
29 views

<a>tag in register_sidebar

I use this sidebar widget between thumbnail posts. When I insert <a href="example"><img src="example2"></a> tag in widget, its size and position show post`s size and position ...
0
votes
0answers
45 views

Why isn't my registered sidebar showing up in the admin?

I'm using sidebars in my mega menu drop downs to let the admin add widgets specific areas of the menu: <ul class="sub-menu"> <li class="sub-menu-item first"> <ul> ...
0
votes
0answers
44 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
0answers
68 views

Wordpress register_siderbar get incremented value

I have register a sidebar where I need a variable to be incremented each time a widget is added to the sidebar. What I have done: register_sidebar(array( 'name' => __('home-page-widget', ...
2
votes
1answer
509 views

is_active_sidebar() not working

why the is_active_sidebar() function return always false? Function.php code: if ( function_exists('register_sidebar') ) { register_sidebar(array( 'name' => 'Footer Column 2', 'id' ...
0
votes
0answers
76 views

register_sidebar() will not wrap an element properly

I am trying to add a widget for for some reason I cant wrap an element around the widget. Here's the html in the index.php: <article class="intro-widget"> <p> ...
0
votes
1answer
275 views

How do I override a sidebar that is registered in a parent theme when using a child theme?

I currently am using a child theme, and its parent theme has registered sidebars already.. My. problem is that i want to change the parent theme's dynamic sidebar From: register_sidebar(array( ...
0
votes
1answer
395 views

How to pass a special CSS class into widget li

I have assigned a Sidebar into functions.php: register_sidebar( array ( 'name' => 'Footer Widgets Area', 'id' => 'footer_widgets_area', 'description' ...
1
vote
1answer
106 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 ...
0
votes
2answers
292 views

2 dynamic sidebars registered, not showing up

My intention is to have a left and right sidebar on each page. I've registered both of them, implemented my desired widgets, and yet something isn't quite right. The left sidebar (sidebar(1)) loads ...
0
votes
1answer
269 views

Widget title markup in register_sidebar

How come the markup I specify in the 'before_title' and 'after_title' settings of register_sidebar gets applied to the default text WordPress widget but not one of our custom widgets, when both are in ...
3
votes
1answer
145 views

What is the use case for the “Class” parameter in register_sidebar?

I registered a new sidebar and filled in the class parameter (see code), I then dropped in an Archive widget and went hunting for my "testing" class. Not there. So what is the class parameter used ...
1
vote
2answers
2k views

HowTo: Add Class to Sidebar Widget List-Items

The newest version of Bootstrap (v3.0) adds a new List Group component which has the following structure: <ul class="list-group"> <li class="list-group-item">Cras justo odio</li> ...
0
votes
1answer
69 views

key( $GLOBALS['wp_registered_sidebars'] ) is always showing the same value

I am using this code from another answer add_action( 'dynamic_sidebar', 'wpse_96681_hr' ); function wpse_96681_hr( $widget ) { static $counter = 0; // right sidebar in Twenty Ten. Adjust ...
0
votes
2answers
1k views

Custom Sidebar only on single post

I am developing a child theme for the new twenty thirteen theme and I am trying to add a sidebar (widget area) next to my content. I only want it to display in single posts. What I did: edit ...
0
votes
1answer
62 views

How to create multiple sidebar areas with a forloop and register_sidebars?

Im trying to create like, 8 sidebar areas using an array of page templates (like date, archive, tag ect) and then looping through the array, creating a sidebar for each value. I thought this should ...
0
votes
2answers
360 views

Dynamic Sidebar Conditional [duplicate]

EDIT Answer was found here: is_active_sidebar() Always Returns False By user: s_ha_dum I'm dynamically creating sidebars and registering them for every top level page: Dynamically Register ...
0
votes
1answer
495 views

Sidebar widgets - dynamic CSS : problem with widget-title

Fortunately or unfortunately without much studying I made a dynamic sidebar widget area for my client's website. My functions.php codes are: ... register_sidebar( array ( 'name' => 'Left ...
1
vote
1answer
334 views

Widgets not activated alert after using get_sidebar()

I stumbled upon avery strange problem while creating a sidebar for my wordpress theme using the get_sidebar() function in header.php. I inserted the following code in function.php: function ...
1
vote
1answer
162 views

How to increase maximum number of sidebars support?

How can i use more than 20 sidebars in wordpress. I'm working on a big information portal, and I need big amaunt of sidebars (about 40, I guess). So I have 20 sidebars now and when I add one more it ...
0
votes
2answers
213 views

Add #sidebar-2 to a custom page template

I registered a few custom sidebars, and the corresponding code in my version of TwentyTwelve theme now looks like this: register_sidebar( array( 'name' => __( 'Sidebar #1', 'twentytwelve' ...
1
vote
2answers
499 views

Hooking Into Widget Output Loop

When wordpress sidebar outputs any particular registered sidebar it loop through all widgets that assigned through it and outputs it (i guess). Is is possible to hook into the loop and add some ...
0
votes
1answer
144 views

Custom sidebar not showing in the dashboard

I am trying to create a new sidebar. For that I have used the following code: In functions.php if ( function_exists('register_sidebar') ) register_sidebar(); if ( function_exists ...
0
votes
1answer
78 views

Copy Widget Settings because of changed IDs

I want to update a customers blog to a child theme that is based on a newer version of the actual deployed theme. My problem is, the developers of the theme changed the IDs of sidebars. In the old ...
3
votes
1answer
647 views

Registering Sidebars and Sidebar Widgets. Sidebar Widgets Not Displaying

I am registering sidebars and sidebar widgets. The theme currently supports two sidebars. Primary and Secondary. add_action('widgets_init', array($this, 'add_sidebars'), 10, 2); public function ...
0
votes
1answer
56 views

How to troubleshoot Sidebar not being generated

I'm building a custom theme. My sidebar is not being generated at all. In functions.php, I have: if ( function_exists('register_sidebar') ) { register_sidebar(array( 'name' => ...
0
votes
3answers
607 views

Showing sidebar-2 on custom template page

Environment: WP 3.5, Twenty Twelve child theme. I created a custom template. Now, I'd like to display the built-in sidebar-2 in this custom template page (instead of the default sidebar-1). sidebar-2 ...
1
vote
1answer
134 views

Custom page sidebar using Template dropdown box

i am wondering how i go about making a Template for some of my pages to use a different sidebar? I have created the widget like this: register_sidebar(array( 'id' => 'ourPat-sidebar', ...
2
votes
1answer
103 views

duplicate sidebar

I have a problem with a sidebar. I have 4 sidebars: "Essential", "Essential+", "Premier" and "Premier+". register_sidebar( array( 'name' => __('Essential Plan'), ...
0
votes
2answers
58 views

finding sidebar content in wordpress

Hey all i have been trying to find the content that loads up for a page for a few days now and can not seem to find where its located. This is the WP code that seems to populate the content: if ( ...
1
vote
3answers
652 views

Wordpress widget/sidebar dividers?

I have a widget sidebar, but I'd like dividers between them. I can achieve this in CSS using boring borders, but I have a png image I'd rather use instead. Is there a way to insert a divider after ...
1
vote
1answer
635 views

Register/Get sidebar?

I can't quite seem to figure out how it works. By default i have a sidebar in sidebar.php that i load using get_sidebar();. That works great (no need to register it), but i have a custom page ...
9
votes
2answers
5k views

what is allowed as an id argument in register_sidebar( $args )

I am want to register a sidebar but i am a little confused about the uses of the id argument in register_sidebar function. Codex says: id - Sidebar id - Must be all in lowercase, with no spaces ...
1
vote
2answers
578 views

What are ideal hooks to call register_sidebars?

Where should a plugin ideally hook to call register_sidebar();? Will init do just fine? function my_plugin_register_sidebars() { $args = array( 'name' => 'foo' 'description' ...
2
votes
1answer
880 views

register_sidebar ignores 'id' and 'class'

I am using the following to register a widget area: if ( function_exists('register_sidebar') ) register_sidebar( array( 'name' => __( 'Footer Widgets', 'hex'), 'id' => ...
0
votes
1answer
102 views

An issue with register_sidebar and the admin interface

Okay, I'm sure there is an simple explanation for this problem... it's just that I can't see it right now. Here is my code adding widget sidebars: add_action('widgets_init', ...
1
vote
2answers
421 views

Creating a different side bar for single posts than for main page.

How can I create a different side bar for single posts than for main page? At the moment I have 2 working one for pages and one for the blog thanks this is how it looks in funtions.php // Register ...
4
votes
2answers
2k views

Get sidebar parameters (before_widget, before_title, etc.) from within a widget

Is it possible to dynamically get sidebar parameters from within a widget? That is, I am trying to access the before_widget/after_widget/before_title/after_title/name parameters of the containing ...
2
votes
1answer
574 views

Best practices: Custom theme sidebar menu - hardcode or widget?

Is it best to hardcode a sidebar menu using functions.php or sidebar.php OR use the custom menu widget? Are there times when each is appropriate?
0
votes
2answers
75 views

Registering Sidebar. Additional banners got displayed

I need to register a test sidebar and have to include it on a specific page. On registering sidebar as register_sidebar(array('name' => 'ABC')); Additional banners get displayed on all pages. ...
3
votes
2answers
2k views

How to wrap the widget content with a div or get the widget title outside?

Is there a way to get the widget title outside of the widget area like this: <ul> <li> <h2 class="widgettitle">The title here</h2> <div class=""widget> ...
0
votes
1answer
385 views

Move wordpress sidebar on homepage up to new position

This should be a simple task, however I am having no such luck. I am using a theme that has a homepage slider which spans across the entire content area. I have been asked to reduce the size of the ...