Last active
May 8, 2018 18:49
-
-
Save chriswagoner/63b840650feb53d17b185c633e0260b5 to your computer and use it in GitHub Desktop.
Nested Shortcode via Filter
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
| /** | |
| * This will allow you to grab the output of an existing shortcode (you're probably already using) | |
| * and execute the shortcodes you're using inside of it. | |
| */ | |
| function my_function_name ( $output, $tag ) { | |
| if ( 'existing_shortcode_name' != $tag ) { | |
| return $output; | |
| } | |
| $output = do_shortcode($output); | |
| return $output; | |
| } | |
| add_filter('do_shortcode_tag', 'my_function_name', 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment