[wp-hackers] filter the_content without affecting the_excerpt

Philip Walton philip at philipwalton.com
Tue Jul 19 19:38:00 UTC 2011


In my theme I'm adding a filter to "the_content" to insert social 
sharing buttons at the beginning of each post, but then when I call 
the_excert() the text of those buttons is showing up.

I know I can just write another filter on "get_the_excerpt" to remove 
them, but that just seems wrong.

Is there a way to filter the_content without affecting the_excerpt?


More information about the wp-hackers mailing list