Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

justawebbie on "getting different sidebars in footer"

$
0
0

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 all articles
Browse latest Browse all 8245

Trending Articles