0

code from template where i call header sidebar

<div class="wrapper">
<?php get_sidebar("header"); ?>
<div id="switcher">

widgets.php has following coding...

 <?php
if (function_exists('register_sidebar')) {

register_sidebar(array(
    'name' => 'Header',
    'id'   => 'header',
    'description'   => 'This is the widgetized header.',
    'before_widget' => '<div id="%1$s" class="widget %2$s">',
    'after_widget'  => '</div>',
    'before_title'  => '<h4>',
    'after_title'   => '</h4>'
));
register_sidebar(array(
    'name' => 'Sidebar',
    'id'   => 'sidebar',
    'description'   => 'This is the widgetized sidebar.',
    'before_widget' => '<div id="%1$s" class="widget %2$s">',
    'after_widget'  => '</div>',
    'before_title'  => '<h4>',
    'after_title'   => '</h4>'
));
register_sidebar(array(
    'name' => 'Footer',
    'id'   => 'footer',
    'description'   => 'This is the widgetized footer.',
    'before_widget' => '<div id="%1$s" class="widget %2$s">',
    'after_widget'  => '</div>',
    'before_title'  => '<h4>',
    'after_title'   => '</h4>'
));

}
2
  • you want to display sidebar without call 'get_sidebar' right? May 28, 2015 at 11:03
  • solved it...dynamic_sidebar(); May 28, 2015 at 11:22

1 Answer 1

0

i was using get_sidebar() instead of dynamic_sidebar('name')....

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.