[wp-hackers] How to display one thing for the_content() and another
for the_excerpt() ?
viper at viper007bond.com
Wed Apr 18 12:46:58 GMT 2007
I have a post with some placeholder text. I want to replace the placeholder
with one bit of HTML for the_content() and another bit of HTML for
This works fine and dandy when the user has manually entered some excerpt
text. However, when WordPress generates it's own excerpt based on the post,
what happens from what I can tell is this:
1. Post content is grabbed from the database
2. Content run through "the_content" and placeholder is replaced with some
HTML due to my filter
3. HTML is stripped for excerpt purposes
4. Content is run through "the_excerpt" at which time there is nothing left
to search for to replace
What can I do? Is there some way to dynamically run "the_content" based on
whether we're making an excerpt or not?
I mean, I guess I could always use a is_archive() check as the_excerpt()
will only be on archive pages (like categories) for this client, but that's
not ideal as it's cheating.
Viper007Bond | http://www.viper007bond.com/
More information about the wp-hackers