If not category, then add Author Information
-
Hi,
My blogsite is https://www.original-republican.com, and for some time, I have been trying to add some code to my Twenty Eleven, content-single.php file that would display my custom author info, if the category is not “Political Artwork,” or whichever other categories I chose to exclude.This basic example is working:
<?php if (! in_category('Political Artwork') ) the_author_posts_link(); ?>
However, I would like to do something a little more custom. I’ve also tried this example, but can’t seem to make it work:
<?php if (! in_category('Political Artwork') ) <p>Written by: <?php the_author_posts_link(); ?></p>
Would somebody be able to tell me how I might be able to make that method work, so that I can expound on it?
Thank you,
Mark
- The topic ‘If not category, then add Author Information’ is closed to new replies.