Skip to content

Instantly share code, notes, and snippets.

@mwender
Created October 17, 2013 13:44
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Remove features from WordPress parent theme. Great for removing things like shortcodes.
add_action( 'after_setup_theme', 'remove_parent_theme_features', 10 );
function remove_parent_theme_features(){
// remove shortcode from parent theme
remove_shortcode( 'example' );
// replace with child theme shortcode callback
add_shortcode( 'example', 'child_theme_example_callback' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment