[wp-hackers] Filter post (the_content), but not excerpt (the_excerpt)

Aaron D. Campbell wp-hackers at ezdispatch.com
Tue Jan 9 19:42:20 GMT 2007

I'm trying to figure out how I can filter a posts content, without 
filtering an excerpt.  I know that I can check is_archive to see if I'm 
in an archive (which usually uses excerpts), but it seems like there 
must be a way to do this.  I tried attaching to the_excerpt, and setting 
a static variable that my function attached to the_content could check, 
but it seems that the "the_content" filters are executed BEFORE the 
the_excerpt filters.  Is there some way to do this now, or can we set 
some sort of variable that can be used to see if WordPress is going to 
turn the post into an excerpt?

More information about the wp-hackers mailing list