How to enable / disable sidebar?
-
Hi,
I have created a sidebar which looks like this:
function customSidebar(){ register_sidebar(array( 'name' => 'Custom Sidebar', 'id' => 'sidebar-3', 'before_widget' => '<li id="%1$s" class="widget %2$s">', 'after_widget' => '</li>', 'before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>', )); }
This works absolutely fine and I can see my widget when I go to Appearance -> Widgets.
But I would like to have the option to enable or disable that sidebar whenever I want on any post.
How can I do that?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to enable / disable sidebar?’ is closed to new replies.