I was recently asked how to display the title only on all category archives.
The easiest solution is to simply hide what you don’t want displayed using CSS code in your child themes style.css file.
.category .entry-meta,
.category .entry-content {
display: none;
}
The CSS above will remove both the post info and post meta as well as the excerpt and featured image so only the title displays.
Works on HTML 5 themes only and will need to be modified for theme specific classes.
And here’s the result:
You can also achieve the same result using PHP code which i will write about shortly.
Hey Brad,
In this same idea, I am trying to remove the meta data from all posts in a specific category. So basically, if I categorize a post in the /category/case-studies/ I don’t want it to display the meta data. And really it is only the date I for sure want to hide. Author, tags and category I can live with, but not date.
I tried:
I’m using HTML5 Agency Pro from Studiopress..
But that didn’t work.
Because it is post info not post meta which is now named entry-meta.
Or use PHP: