Remove features from WordPress parent theme. Great for removing things like shortcodes.
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
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