accessing sidebar 0?
-
when I am in Design | Widgets, over on the right is a drop down to view the Current Widgets by Sidebar. I get a choice of Sidebar 1, or SideBar 2 – is there any way to access Sidebar 0 here? or is that reserved for something else? or a function of theme design?
-
The theme defines what the sidebars are named. If it doesn’t give a specific name, WordPress names them Sidebar 1, Sidebar 2, Sidebar 3, and so on.
There is no sidebar zero unless the theme defines one explicitly.
thanks – my theme (blacksplat) does have references to Sidebar 0 – looking at sidebar.php it appears to be static – no call like
<?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘sidebar0’) ) : ?>
but those calls do exist for sidebar 1 and 2
am I correct when I say that only dynamic sidebars show up in the Design | Widgets screen drop-down selector?
In the theme’s functions.php file, it will define what sidebars that theme has by calling register_sidebar or register_sidebars. That’s where the sidebar names get defined.
The
dynamic_sidebar('whatever');displays those sidebars by name.thank you again. I converted sidebar0 to a dynamic sidebar, registered it in functions.php, then had to do a little widget reorganizing, but all is as I wanted it now.
The topic ‘accessing sidebar 0?’ is closed to new replies.