I was hoping to process the_excerpt just like one would with the_content, but no such luck.
How can I pass the excerpts of a Posts Page, through my plugin? I've tried variations on this:
add_filter('the_excerpt', 'my_function');
But alas, no go. Suggestions?
EDIT: It looks like my filter call won't work when called from within another function, but it DOES work if it's at the same level of the function I'm calling, like so:
add_filter('the_excerpt', 'my_filter');
function my_filter($content) {
die('hello');
}
Any ideas why this is?
the_excerpt
just applies default filters toget_the_excerpt
which can also be filtered. usehas_filter
and make sure nothing is removing filters fromthe_excerpt
. try just a simple function and throw adie()
in there or something.global $wp_filter; print_r($wp_filter['the_excerpt']);
in your template?