New custom widget area
-
Hello
I have created a new custom widget area next to a front page slider. i am using a image widget to upload an image.the issue I have is the new widget area is displayed in all other pages as well even when I switch to full width which normally should not display. how do I get it just to display on the front/home page.
this is what I’ve done:
register_sidebar(array(
‘name’ => __(‘Top Bar’),
‘id’ => ‘topbar’,
‘description’ => __(‘The widgetized top bar. Drag and drop widgets from the left’),
‘before_widget’ => ‘<div id=”%1$s” class=”widgets”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h2>’,
‘after_title’ => ‘</h2>’,
));and header php:
<?php /* Widgetized sidebar */
if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘Top Bar’) ) : ?><?php endif; ?>
</div>is there anything I can do without too much complications?
- The topic ‘New custom widget area’ is closed to new replies.