is_author() query – controlling sidebar for multiple authors
-
Hi,
I’m hoping someone one here might be able to help!
I’m currently working on a website that will have about 100 authors, all of whom need their own page. That’s fine, but I want different groups (based on alphabet and what year they became authors in the project) to have different sidebars displayed. e.g. ‘2009’>’Authors A to G’
I can do this for each individual author e.g.
<?php elseif (is_author('63')) : ?> <div> do something relating to this authors</div>
But I really don’t fancy having 200 lines in sidebar.php just relating to these authors. Is there a way to put multiple ID numbers into one is_author conditional. e.g. if it’s an author page ID 63, 64, 65 etc. then ‘do something relating to these authors’?
I’ve tried a couple of different permutations but I either get a php coding error on the front end or it just shows up blank.
Any help gratefully received!
- The topic ‘is_author() query – controlling sidebar for multiple authors’ is closed to new replies.