<?php if (is_home ()) {
get_sidebar( 'main' );
} elseif (is_category('events')) {
get_sidebar('events');
} elseif (is_category('news')) {
if (has_tag('employee')) {
get_sidebar('employees');
} elseif (has_tag('student')) {
get_sidebar('students');
} else {
get_sidebar('news');
}
} elseif (is_page('Athletics')) {
get_sidebar('athletics');
}else {
get_sidebar();
} ?>
]]>Thanks
]]>I’m trying to get 4 pages that need different sidebars to appear at the main sidebar for that page(1,2,3,4). Each of those 4 pages have child pages under them. The child pages need to have the same sidebar as the parent pages.
In our pages.php file we have
<?php
if (is_page('28') && $post->post_parent =="28") {
include ('sidebar-1.php');
} elseif (is_page('36') && $post->post_parent =="36") {
include ('sidebar-2.php');
} elseif (is_page('38') && $post->post_parent =="38") {
include ('sidebar-3.php');
} elseif (is_page('24') && $post->post_parent =="24") {
include ('sidebar-4.php');
}
else{
include ('sidebar.php');
}
?>
I’m stuck in getting the parent pages to show the correct sidebar, however the child pages do show them correctly.
Any ideas?
]]>just started tinkering about with a very nice template. Not sure what i’ve done but the sidebar moves to the the left ever so slightly on the home page on Safari & Firefox.
Can’t figure it out? Can anyone help? I’d rather the sidebar remain stationary!
Thanks.
]]> <?php if (is_page(‘3’) ) { ?>
<?php include (‘about_sidebar.php’); ?>
<?php } ?>
However, I would like to make it more dynamic, preferably by author or some sort of category. I’ve tried this function below, but nothing loads.
<?php if (is_author(‘ABOUT’) ) { ?>
<?php include (‘about_sidebar.php’); ?>
<?php } ?>
Any tips on how to get my function to be “dynamic” in terms of allowing me to discriminate my pages either by author or some sort of category (is their a category plugin for pages that I could possibly use?).
Thanks
]]>