• I am trying to get my sidebar to work, but it simply won’t. The code is pretty basic:
    In my functions I have:

    function padd_widgets_init() {
    	register_sidebar(array(
    		'name' => 'Sidebar',
    		'before_widget' => '<div id="%1$s" class="box %2$s">',
    		'after_widget' => '</div></div>',
    		'before_title' => '<div class="title"><h3>',
    		'after_title' => '</h3></div><div class="interior">',
    	));
    }
    add_action('widgets_init','padd_widgets_init');

    The sidebar.php file looks like this:

    <div id="sidebar">
    	<div class="pad">
    		<h2>Sidebar</h2>
    
    	<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar') ) : ?>
    
    	<?php endif; ?>
    
    	</div>
    </div>

    And the page.php contains <?php get_sidebar(); ?> but I have also tried <?php get_sidebar('Sidebar'); ?> to no avail.

    Am i doing something wrong?

Viewing 1 replies (of 1 total)
  • I didn’t test this code, but maybe try naming it something different? Sidebar seems like a name that might conflict with defaults.

Viewing 1 replies (of 1 total)
  • The topic ‘Dynamic Sidebar trouble’ is closed to new replies.