• Resolved archard

    (@archard)


    I know you can change your sidebar content based on a post’s category, but is there a way to change it based on a page’s template?

Viewing 5 replies - 1 through 5 (of 5 total)
  • In a way… yes. Every template could have a call for its own (custom) sidebar.

    Thread Starter archard

    (@archard)

    Really?

    I guess the default sidebar gets called by

    <?php get_sidebar(); ?>

    But once I make another sidebar, how do I call that?

    Indeed, how would that work?

    So then could you have multiple, widgetized sidebars?

    <?php include (TEMPLATEPATH . '/mysidebarl.php'); ?>
    <?php include (TEMPLATEPATH . '/mysidebar2.php'); ?>
    etc.
    (providing the new sidebar files are in your theme’s directory)

    EDIT. I don’t know anything about widgets, sorry. I don’t use them.

    Thread Starter archard

    (@archard)

    Holy cow, it works. Thanks for the help moshu.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Dynamic Sidebar based on page template?’ is closed to new replies.