Hide info on some categories only

Posted in: Newspaper
Post count: 494

Hi, is there a way to hide the following information for all the posts of some categories only (meaning: hiding it for some categories and showing it for some other ones)?
– Author
– Date
– Post views
– Comments count
– Next and previous
– Comments

Post count: 9

You can always use different category layout in theme panel > layout setting > categories > article display view, and delete the elements you want to hide.

Post count: 494

Thanks for your reply but my question was about these elements in the category page AND in the posts pages.

Post count: 9

can you be more specific?

Post count: 9

if you’re referring to ARTICLE DISPLAY VIEW in theme panel, then you need to modify the module in include/modules/td_module_(…).php, and for the posts page it’s in loop-single-(…).php

Post count: 7909

Hi,

The theme doesn’t have an option for this, but you could try to hide them using custom css.
For example you can hide the meta info on post page and category page using this css code – https://www.screencast.com/t/nsvV95tWhttps://www.screencast.com/t/kywadqiL2

.category-applications .td-module-meta-info {
display: none;
}

Replace applications with your category slug.

Also to hide next/prev and comments:

.category-applications .td-post-next-prev, .category-applications .comments {
display: none;
}

Thanks!

Post count: 494

Thanks Alin for your reply.
So, if I want to hide more than 1 category, should I duplicate the code as below in the custom css or should I write it differently?

.category-slug1 .td-module-meta-info {
display: none;
}

.category-slug2 .td-module-meta-info {
display: none;
}

Moreover, isn’t there an easy way to customise this code so, when this data is hidden, the space is removed (as opposed to empty)?

Post count: 20688

Hi,

That would be the easiest way of doing what you want. You can multiply the code for other categories, if that is needed. The theme panel settings will affect all the posts, it is a general setting.
Inspect the page with the browser inspector, identify the elements you want to hide and create custom code, or adapt the one mentioned
https://forum.tagdiv.com/create-custom-code-using-the-browsers-inspector/
The only element in your list that can be disabled per post with a setting, is the comments
https://www.screencast.com/t/55jQeRzRee

Thanks

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