how do i limit the words display, say only 20 words when i call out <?php the_excerpt ?>
thanks in advance.
how do i limit the words display, say only 20 words when i call out <?php the_excerpt ?>
thanks in advance.
Use the <!--more--> tag to set the excerpt where you want it, and use the_content() instead?
http://codex.wordpress.org/Customizing_the_Read_More
http://codex.wordpress.org/Template_Tags/the_excerpt
http://codex.wordpress.org/Template_Tags/the_content
well, i plan to use the_excerpt in my archive page. it seems like the the_excerpt display too many words and i would like to limit it because i display all the post in my archive.
is limiting words in the_excerpt playing with the core codes?
Yes. It is set in core files to 120 words, I think.
You can use Kaf's brilliant excerpt plugin, the excerpt reloaded - which is available here:
http://guff.szub.net/the-excerpt-reloaded
What it does:
Based on the_excerpt, the_excerpt Reloaded, when a post does not contain an excerpt, displays the contents of the post (typically abbreviated), which can be customized on which HTML tags to allow, length of the excerpt (in words), “more…� link, and filtering type. The plugin’s function the_excerpt_reloaded() must be used in The Loop.
No need to screw around with more tag, or excerpt core :)
Thank you! This is just what I needed for a site I'm making. I love these forums and the search feature. ;)
This topic has been closed to new replies.