Skip to content

Instantly share code, notes, and snippets.

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