On my archive page, the_excerpt() does not display content before the more tag, but a cut of the post's full content. I'm obliged to fulfill the "Excerpt" in the post editor which will override it. How to force the_excerpt() to show only the content before the more tag?

  • Could you provide some example? Of what posts starts with, where is more tag, what you expect to get as generated excerpt and what you actually get? WordPress should do what you want as I understand it, which makes me think I am not understanding question correctly.
    – Rarst
    Sep 5, 2011 at 11:34

2 Answers 2


Why not just switch out the_excerpt for the_content in your theme? Or create a child theme and override the relevant files.


  • Well, I just saw that the_content and the_excerpt just ignore the <-- more --> tag when the display page is supposed to be a single one. My archive is set on a page with a special template, so it just behaves like if it was a single page beeing displayed... Could a child theme override that behavior? My goal is to have an archive page for the post type 'post', like a page called "archive-{post-type}.php". Is there any way I can get to the same result whithout using a page template?
    – Morhaus
    Sep 5, 2011 at 0:19
  • 3
    to overcome that single page behaviour: codex.wordpress.org/…
    – Michael
    Sep 5, 2011 at 9:02

or add the following function to functions.php:

function my_excerpt(){
 global $post;
$link='<a class="more" href='.get_permalink($post->ID ).'>Read More...</a>';
echo $excerpt.$link;
return true;

the previous function appends the perma link of the post to the excerpt,we used the filter the_excerpt so that when we use the_excerpts(); it results our customized excerpt.

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.