Forums

trouble shooting sidebars for different pages (2 posts)

  1. rmfn8475
    Member
    Posted 6 months ago #

    ok first url http://RMFNATION.com

    I have created additional sidebars within my theme using code below, placed inside my function.php:

    if ( function_exists('register_sidebar') ) {
    	register_sidebar(array(
    		'name' => 'music',
    		'id' => 'music',
            'before_widget' => '<li id="%1$s" class="widgetb %2$s">',
            'after_widget' => '</div><div class="clearer"></div></li>',
            'before_title' => '<h2 class="widgetbtitle">',
            'after_title' => '</h2><div class="ruler"></div><div class="widgetb_container">',
        ));
    
    }

    With that successfully done.. the next thing I am trying to do is apply each additional sidebar that I created on each page listed in top menu.. ex. Music, Entertainment, video, interviews etc..

    question #1: Do I have to create separate php files within the theme template to call the sidebar for each menu option. ex: sidebar-music.php sidebar-entertainment.php sidebar-video.php etc.. to call the sidebar to the specific page I want?

    question #2: And if that is the case.. what would be the code used to call the sidebar? I have played around with numerous code ex:

    <?php get_sidebar( 'music' ); ?> I applied this within the sidebar.php with no results... or am I going about this the wrong way??

  2. rmfn8475
    Member
    Posted 6 months ago #

    bump

Reply

You must log in to post.

About this Topic

Tags