getting different sidebars in footer
-
I am new to WP but giving it a try on making my own child theme from Twenty Thirteen. I am trying to get a different sidebar for category, tag, and page. It does not work for the news category. I have this code in my footer, should i put it somehow in my functions.php? If so, would someone explain how to do that to me. Can you tell me what I did wrong please.
<?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(); } ?>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘getting different sidebars in footer’ is closed to new replies.