pluggable – How to override parent functions in child themes? – WordPress Development Stack Exchange

You should run the code after theme setup.

function osu_twentyten_continue_reading_link() {

return ' <a href="'. get_permalink() . '">' . __( 'Read on <span class="meta-nav">→</span>', 'twentyten-child' ) . '</a>';

}

function osu_twentyten_auto_excerpt_more( $more ) {

return ' …' . osu_twentyten_continue_reading_link();

}

function my_child_theme_setup() {

remove_filter( 'excerpt_more', 'twentyten_auto_excerpt_more' );

add_filter( 'excerpt_more', 'osu_twentyten_auto_excerpt_more' );

}

add_action( ‘after_setup_theme’, ‘my_child_theme_setup’ );

via pluggable – How to override parent functions in child themes? – WordPress Development Stack Exchange.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.