• I’ve registered my 2 sidebars in functions.php ok, and they both appear on the widget page in dashboard & allow me to drag widgets on to them as expected.

    In sidebar.php I’ve got:

    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar()) : ?>
    [then more old sidebar code that existed before I made it dynamic]
    <?php endif; ?>

    Which works perfectly for sidebar 1

    in sidebar2.php I have:

    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(2)) : ?>
    
    [more old sidebar code]
    
    <?php endif; ?>

    But sidebar 2 does not display the selected widgets. It only displays the [more old sidebar code] part instead.

    Any ideas please?

Viewing 4 replies - 1 through 4 (of 4 total)
  • tell me you function.php files form where you have added this widgets

    Thread Starter robpannell

    (@robpannell)

    I’m afraid I don’t understand what you’re asking me for… I think you want to see my function.php code?

    This is everything in function.php:

    <?php if ( function_exists('register_sidebar') )
        register_sidebars(2);
    ?>

    Nothing more than that.

    Thank you

    hei this my code and succes…. look at

    function.php

    <blockquote>register_sidebar(array(
    	 'name' => __( 'Akbar Widget Area', 'Games Themes' ),
    		'id' => 'akbar-widget-area',
    		'description' => __( 'The akbar widget area', 'Games Themes' ),
    		'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
    		'after_widget' => '</li>',
    		'before_title' => '<div id="lw"></div><h3 class="widget-title">',
    		'after_title' => '</h3><div id="rw"></div>',
    	) );</blockquote>

    and this on sidebar.php

    <?php if ( is_active_sidebar( ‘akbar-widget-area’ ) ) : ?>
    <div id=”third” class=”widget-area”>
    <ul class=”xoxo”>
    <?php dynamic_sidebar( ‘akbar-widget-area’ ); ?>

    </div><!– #third .widget-area –>
    <?php endif; ?>

    Thread Starter robpannell

    (@robpannell)

    Thanks for the help, but I’m afraid your code didn’t make a difference.

    Anyone else got suggestions?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘dynamic sidebar 2 not showing selected widgets’ is closed to new replies.