Hide Elements for a specific Category in Articles

Posted in: Newspaper
Post count: 9

Hi,
I tried to hide some elements for a specific Category in Articles.
bands = title form

I used this css code:
.single .category-bands .td-post-next-prev-content {
display:none;
}

The code works but it disable the element on all Articles.
I tried also to disable the elements in only one specific Article by using the post-id:
.postid-450 .author-box-wrap, .td_block_related_posts {
display:none;
}

Same result. Can you help me?

Post count: 20688

Hi,

If the post has multiple categories these will all be displayed as classes in the article code. For example
https://www.screencast.com/t/DCo48fb1mVo
So if the category you want to hide this element, is present in the article classes, the next/prev will not be displayed and will be affected by the code. This could be done by using the post Id specifically, or by post template maybe
https://www.screencast.com/t/EyxZnpQ34
https://www.screencast.com/t/L1G2tsrHGa
The second code you mention will remove the related posts section on all posts. It should be like this to apply on a specific post

.postid-450 .author-box-wrap,
.postid-450 .td_block_related_posts {
display:none;
}

Thanks

Post count: 9

Great help. Thanks!

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