• 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 php file, I have the shortcode working to return the above information in the 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 or nothing. $_GLOBALS and global $variable don’t seem to work. I’d really appreciate a tip here!

    Thanks,
    Dan

  • The topic ‘Shortcode output elsewhere in template’ is closed to new replies.