How can I add a filter to show the author byline on just some categories?
For instance, I want to show the byline on blog posts, but not on news category posts.
Thanks for your quick reply.
I don’t see information on this page about how to filter by category.
Please let me know what I am missing…
Thanks for your help!
You’ll need to modify the code or use CSS. I have written about this in a couple of posts so I can provide the code tomorrow.
The conditional tag to filter by category is
check the Codex
You would use this code in a custom function with the conditional tag:
remove_action( 'genesis_before_post_content', 'genesis_post_info' );
Awesome! Thanks so much for your help.
Thanks. We did it already. We actually just want to *include* the Blog category.
We added this to the Simple Hooks plugin:
<span class=”time”>’;?><?php if(in_category(‘blog’ )) the_time(‘F j, Y’); ?></span> <span class=”author”>
<?php if(in_category(‘blog’ ))
echo’by ‘; if(in_category(‘blog’ )) the_author(); ?></span>
You must be logged in to reply to this topic.
Are you a blogger, web designer, developer, or website owner looking to generate more income?
Promote products for the largest and fastest growing online website platform as part of our affiliate program.