Hide the "read more" button of a specific category
-
Hello,
I’ve found lot of topics about how to show, custom, change text of this “read more” button, but unfortunately nothing help me.
So here my question : I have several category pages, where posts from a specific category are display. I’m using the_excerpt() function and the button “read more” for all my post. So now I would like to keep the excerpt but hide the button “read more” for only one category (“hotels”).
Any idea how can I do that? I tried to add some code in the loop.php, but since I’m a really noob at PHP… I can’t do any good job.
So I think, I’d need a code which say basically : If category is hotels, hide the button, else show the button.
Any help would be welcome!
Thank you very much.
the specific page where I want to hide this button : http://aircom.imadiff.net/blog/category/hotels/
Add this to Custom CSS.
.category-hotels .entry-content .more-link {
display: none;
}You’ve added that code to parent theme style.css. Don’t do that. Your modifications will be overridden when the theme gets updated. Add that to Custom CSS or child-theme style.css.
Also, you have to clear your browser/server cache after adding that to your site.
You are welcome! 🙂
Viewing 6 posts - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.
