I am building a site, where the main menu contains links to different post categories.
If possible, I would like to be able to show post date with every article in one category, and no post date in posts in another category.
Both on the archive pages and on single post pages.
Is that possible?
Thanks in advance.
Hi Hans
With some Custom CSS it is possible. Can you send me links to each page with directions as to which must show the date and which must not.
Thanks
Hi Andrew,
Show: Posted on xxxx by xxxxx on this archive: http://wptest01.zkagen-marketing.dk/category/kategori1/
Do NOT show on this archive: http://wptest01.zkagen-marketing.dk/category/kategori2/
Thanks in advance.
HC.
Thanks, let’s try:
Works beautifully!
Is it possible to hide: Category Archives:
– from both page headers?
Super, glad to hear that helped.
Try:
Hi Andrew,
Thanks for the very fast feedback :-)
That sort of works, but it hides the entire header. I only want to hide: “Category Archives:” not the category name.
Can that be done?
There isn’t any tag wrapping the “Category Archives” part of the string so you’d need to filter the function itself. To do that you’d need to insert the following into the functions.php file of your child theme:
You can then edit the string from within that function.
Okay, I will try that.
One final question.
Is it possible to hide the featured image on both the single post page and the archive page, but only for a certain category?
Show feature image on these pages:
http://wptest01.zkagen-marketing.dk/category/kategori1/
http://wptest01.zkagen-marketing.dk/nyhed-fire-er-super-fantastisk/
Hide featured images on these pages:
http://wptest01.zkagen-marketing.dk/category/kategori2/
http://wptest01.zkagen-marketing.dk/med-nyhed-tre-bliver-det-rigtig-godt/
This would hide the featured image for the given archive:
As you’ve seen we’re using body classes to do all of this. This is what the body tag looks like on the single post you linked to:
There is no identifier for the category it belongs to.
If you set the post format to “Aside” then you could hide the featured image as follows:
Hi Andrew,
The code:
Seems to do the job nicely.
Thanks!
Glad that helped :)