Created
February 16, 2024 18:29
-
-
Save netwizards/7966aa34d6397d08c1e75a4fc372787d to your computer and use it in GitHub Desktop.
Enable shortcodes for menu navigation
This file contains hidden or 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
| /** | |
| * Enable shortcodes for menu navigation. | |
| */ | |
| if ( ! has_filter( 'wp_nav_menu', 'do_shortcode' ) ) { | |
| add_filter( 'wp_nav_menu', 'shortcode_unautop' ); | |
| add_filter( 'wp_nav_menu', 'do_shortcode', 11 ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment