Why can't I override WP's 'excerpt_more' filter via my child theme functions?
- by Osu
I can't seem to get my functions to work for changing the excerpt_more filter of the Twenty Eleven parent theme.
I suspect it might actually be add_action( 'after_setup_theme', 'twentyeleven_setup' ); that's the problem, but I've even tried remove_filter( 'excerpt_more', 'twentyeleven_auto_excerpt_more' ) to get rid Twenty Eleven's function and still my functions aren't changing anything...
Can you help?
Here's the functions.php code in full:
http://pastie.org/3758708
Here's the functions I've added to /mychildtheme/functions.php
function clientname_continue_reading_link() {
return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'Read more... <span class="meta-nav">→</span>', 'clientname' ) . '</a>';
}
function clientname_auto_excerpt_more( $more ) {
return ' …' . clientname_continue_reading_link();
}
add_filter( 'excerpt_more', 'clientname_auto_excerpt_more' );
Thanks,
Osu