Hello all;
I am attempting to do what one would probably consider relatively easy at this point, but for some reason I have been at wits end to get it to work properly.
For reference, I am trying to modify http://firefoxnewsonline.com .
Essentially, what I want is for certain pages to display custom sidebars. In previous versions of wp, I could modify the specific page as it appeared in the editor list. In version 2.7 however, it seems 'pages' have been replaced into 'posts' of their own, and it seem I must add "if/else" commands in the page.php template.
As an example,
- when George's 'About' page is selected, I want "sidebar-george.php" called;
- when Dave's 'About' page is selected, I want "sidebar-dave.php" called.
That said, if George's page is "../wp-admin/page.php?action=edit&post=5" &
Dave's page is "../wp-admin/page.php?action=edit&post=6" ,
what would the code look like?
(This is what I have in the page.php)
<?php get_sidebar(); ?>
<?php
if (is_page('5')) {
include(TEMPLATEPATH . '/sidebar-george.php');
elseif ( is_page('6')) {
include(TEMPLATEPATH . '/sidebar-dave.php');
} else {
include(TEMPLATEPATH . '/sidebar.php');
}
?>
<?php get_footer(); ?>