Getting shortcode results to display elsewhere
-
I’d like to use shortcodes at the beginning of pages and posts to control a banner displayed outside of the post itself. For example, at the beginning of each page you’d find:
[banner h1=”About Us” h2=”We’re such a great company, blah blah blah”]
In a plugin file, I have the shortcode working to return the above information in nicely formatted HTML, with divs and markup, etc.
I can’t seem to find a way to have the result of that function stored and echoed out elsewhere on the template. Everything I tried either returns the HTML in place of the shortcode (like normal) or nothing at all. $_GLOBALS and global $variable don’t seem to work. I’d really appreciate a tip here!
Thanks,
Dan
The topic ‘Getting shortcode results to display elsewhere’ is closed to new replies.