I'm trying to hide the date on certain category posts. I want to show the date on news items but not on posts that are in categories outwith this. So, I can see that the following hides the date on all posts:
.post-info .pi_date {
display: none;
}
However, my question is how to I reference a specific category so I can chose which to show the date and which to hide it.
Hi
I'm trying to hide the date on certain category posts. I want to show the date on news items but not on posts that are in categories outwith this. So, I can see that the following hides the date on all posts:
.post-info .pi_date {
display: none;
}
However, my question is how to I reference a specific category so I can chose which to show the date and which to hide it.
Thank you,
Iain
Hello Iain,
You can add this
body.category-my-category-name
to target special category, the example we sent you would be for a category named "my category name"
space are replaced by -
Do not hesitate to contact us if you have more questions.
Have a nice day!
Best Regards.
---------------------
Hosting we recommend ( Free SSL and CDN included in all plan ).
Speed up your site with Autoptimize
Test your site with GTmetrix and fix the issue to make it faster
How to Update your Theme