I wonder if it’s possible to do a shortcode only in another shortcode. For example I got following code pieces:
[heading]some pricing page[/heading]
[pricing_box]
[heading]Some title[/heading]
[/pricing_box]
Now I don’t want to define one shortcode heading which would apply to both the nested one and the first level shortcode. I want the both heading shortcodes to produce different outputs.
Of course, I could try to solve this by renaming one of the shortcodes to title or something, but this doesn’t always result in optimal naming arrangements.
To use a different callback for the nested headings switch the shortcode handler
in the
pricing_box
callback and restore the main handler before you returnthe string.