Is it possible to hide the ‘more’ tag on portfolio items (just in template-portfolio.php) where there are featured images, but no text content or excerpt? Some of my portfolio items have extensive text, and some have none.
Thanks for the reply! Unfortunately, that will remove ALL more links on the template-portfolio.php page. I only want to remove the more link when there is no exerpt or content text. For those portfolio entries with text, I want to keep the more tag.
That’s not easily possible. It would require a function which checks every content/excerpt first and based on the result you’d need to modify the read more button behaviour. Because wp adds some html tags to the content (even if the text editor field appears to be empty) you’d need to filter it first….
Viewing 4 posts - 1 through 4 (of 4 total)
The topic ‘Remove 'Read More' for portfolio items with images but no text content’ is closed to new replies.