WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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 '11 at 11:34

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


share|improve this answer
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 '11 at 0:19
to overcome that single page behaviour: codex.wordpress.org/… – Michael Sep 5 '11 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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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