Skip to content

Instantly share code, notes, and snippets.

@mwender
Created October 17, 2013 13:44
Show Gist options
  • Save mwender/7025155 to your computer and use it in GitHub Desktop.
Save mwender/7025155 to your computer and use it in GitHub Desktop.
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