Mulitple Authors – different sidebars
-
Creating a blog that has four different authors. I want to show a different sidebar for:
-author 1 archive & author 1 post(same sidebar)
-author 2 archive & author 2 post(same sidebar)
-author 3 archive & author 3 post(same sidebar)
-author 4 archive & author 4 post(same sidebar)
-home, category and tag (same sidebar)I’ve tried:
<?php $post = $wp_query->post;?> <?php if ( $post->post_author == '1') { ?> hello author 1 <?php } elseif ( $post->post_author == '2') { ?> hello author 2 <?php } elseif ( $post->post_author == '3') { ?> hello author 3 <?php } elseif ( $post->post_author == '4') { ?> hello author 4 <?php } else { ?> default sidebar <?php } ?>
But doesn’t work. Only shows sidebar for author post, not author archive or any other pages.
Any help would be greatly appreciated.
Thanks
Steve
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Mulitple Authors – different sidebars’ is closed to new replies.