have you tried the Scott Yang’s search excerpt? many customizations are possible
The default behavior of the_excerpt is to remove *ALL* tags. Excerpts are text only, they do not contain links or formatting, by definition.
Thanks nonletter. That looks like a highly useful plugin. I also found this nifty trick on another thread (from pifucan)
When making a specific query (such as
query_posts('category_name=conferences');) in a template, if you then use
the_contentto show your posts, the more tag will be ignored. If you use the_excerpt, your formatting will be stripped. To get around this, create a global variable called
$moreand set it equal to true before calling your query. And then, if afterwards you would like following posts to show their full content, you can set back to “true” after the query is run; like so:
<?php global $more; $more = false; query_posts('category_name=conferences'); the_content('Continue Reading'); //this last line is only necessary if you have more posts //to show in your template and want to show their full bodies, //not excerpts $more = true; ?>
You can find more info on this technique here
- The topic ‘the_excerpt() tag functionality’ is closed to new replies.