I’m looking for a way to hide a specific category title (not all but just one specific category title) from being displayed on the home page, archives, and search results but still show the posts tagged under the category.
Is it possible to do it via CSS or functions hook?
Keep in mind that I want to hide the category title (not the posts under the category. Just the title) from being displayed on home page, archives, and search results.
However, the category name should be displayed on posts.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
This code works perfect. Note that 137 is the category ID that I wish to hide and .home is the page where I don’t want it to be displayed
.home .entry-category-item-137 {
display: none;
}
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0