twofivethreetwo
Member
Posted 3 years ago #
At the moment the_excerpt will show first few lines of content if there is no excerpt, however I need the_excerpt to be blank if there is none, not display lines from the_content. I'm using it to display a thumbnail next to a post. However, not all have thumbnails yet, so I need it blank. How would I do this?
Add this to your theme's functions.php file:
remove_filter('get_the_excerpt', 'wp_trim_excerpt');
twofivethreetwo
Member
Posted 3 years ago #
That did it, thanks. However, now it is adding a <br / where the excerpt would be if there is none.
did you ever get rid of the inserted break? am having the same problem. thanks.