Hide date only for specific posts or categories

Posted in: Newsmag
Post count: 19

Hi,
I’m wondering if it is possible to hide the date only for specific posts, choosing every single post o to all posts in one category containing many subcategories (of course what is set for the highest category will be applied to all subcategories).

Post count: 35449

Hi,
Unfortunately, for the moment it is possible to be hidden only for all posts.
But there can use a custom css that will apply to specific posts only.
Can you provide a few links to posts that you do not want to display the date?
Thank you!

Post count: 19

Sure, for example, I want to hide the date of the posts in this category (both in category and post view): https://nonewsmagazine.com/category/milano-food-drink/categorie-ristoranti/aperitivo/

  • This reply was modified 3 years by signorini.
Post count: 35449

Hi,
To remove the date from the category you can use this custom css:
.category-3326 .td-post-date, .category-3326 .td-post-author-name span {
display: none;
}

and for posts, you can use this code
.category-aperitivo .td-post-date, .category-aperitivo .td-post-author-name .td-author-line{
display: none;
}

The css needs to be set in the theme panel > custom code> cutom css.
I hope this will help you!

Post count: 19

I’ve tried, but nothing happened

Post count: 35449

Hi,
I checked the website and seems that it works now – https://i.imgur.com/8F76Tde.jpghttps://i.imgur.com/4xDjIyJ.png also on posts from that category – https://i.imgur.com/TiNd0lq.jpg other posts that are not part from that category – https://i.imgur.com/A4Forpe.jpg
Thank you!

Post count: 19

Yes, right. Probably when I checked the change it hadn’t propagated yet.
Thanks.
Therefore, to do this modification, I have to put the custom code for each category and/or post I want to modify the view.
I guess, I get the category “code” (in our case, .category-3326) by inspecting the <body> of every category.

Post count: 35449

Hi,
Yes, I understood correctly, this is how it should be done.
If I can help you with anything else, please let me know!
Thank you!

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newsmag’ is closed to new topics and replies.