0

How can I remove the 'read more' link from a post excerpt on a blog/archive page when there is nothing more to read...when the length of the post is shorter than the excerpt?

2
  • Are you using the_content() or the_excerpt() followed a hard coded read-more link in your archive template?
    – anroesti
    Commented Mar 7, 2013 at 3:43
  • Show me your code of displaying the post excerpt. Commented Mar 7, 2013 at 4:12

1 Answer 1

1

Are you using the_excerpt() or $post->post_excerpt? Use $post->post_excerpt and count your words then if the limit exceeds show the read more otherwise don't show.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.