Created
November 26, 2013 16:06
-
-
Save guillermorangel/7661029 to your computer and use it in GitHub Desktop.
Override parent theme functions by running code after theme setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
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' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment