Archived topic
Remove dates from certain categories
5 replies · Started by Ruben on April 5, 2017
Hello Tom
I do not know if this has been answered before here although did not find it.
Well, I would like to know if you know of any way to remove the dates from certain categories that could be implemented in the theme without touching the code.
Lets say I have a category: CFDs that I do not want to show dates in posts
and another category: market commentary, where I want dates shown..
What do you think is the best way I could try to do that with GP?
Thanks
Hi Ruben,
This should help: https://generatepress.com/forums/topic/remove-post-date-from-posts-in-a-specific-category/#post-194426
Let me know.
Thank you.
I applied it in my custom CSS but only worked for the first category.
I would like to remove the date from 3 more categories but only worked for the first one.
.category-brokers .posted-on {
display: none;
}
.category-inversion .posted-on {
display: none;
}
.category-recursos-trading .posted-on {
display: none;
}
.category-trading .posted-on {
display: none;
}
That is the code I put
I wonder what I am missing
Hmm your code looks correct and it should work. You can combine the like this:
.category-brokers .posted-on,
.category-inversion .posted-on,
.category-recursos-trading .posted-on,
.category-trading .posted-on {
display: none;
}
Can you show me the page where it's not working?
Hi Leo, finally I did as you say and it seams to work, 4 categories not displaying dates and 6 displaying them. Good!
I think that the previous way I tried might work also because I realized I had forgotten to write my "trading" category right, because it was "trading-2". It might be why I thought it did not work.
Thanks a lot Leo
Have a good day
Glad I could help! You as well!