Overriding twentyeleven_custom_excerpt_more()
-
I’d like to override
twentyeleven_custom_excerpt_more()
. Really, I just want to remove it. I tried adding remove_filter (in my child theme’s functions.php), per the instructions:remove_filter( 'get_the_excerpt', 'twentyeleven_custom_excerpt_more' );
However, that has no effect. The “continue reading” text still appears.
As a workaround, I added a filter to remove the text it inserts:
function my_custom_excerpt_more( $output ) { return str_replace("…", "", str_replace(twentyeleven_continue_reading_link(), "", $output)); } add_filter( 'get_the_excerpt', 'my_custom_excerpt_more' );
This is kludgy. How can I get remove_filter to work?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Overriding twentyeleven_custom_excerpt_more()’ is closed to new replies.