WordPress plugins, themes, tips and hacks

Showing different sidebar on different pages

February 21, 2007 – 9:06 pm | by Miriam Schwab

To show a different sidebar on different pages, replace the standard call for the sidebar:

<?php get_sidebar(); ?>

with the following code:

<?php include ('sidebar2.php'); ?>

The same can be done to call different headers, i.e. instead of <?php get_header(); ?> use <?php include ('header2.php'); ?>For more information, see Different Sidebars Anyone? on the WordPress codex.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
  1. One Response to “Showing different sidebar on different pages”

  2. By Tony on Apr 22, 2007 | Reply

    But wait, which page do I add/change this code on?!

Post a Comment

Revolution Premium Themes