treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] Wordpress: calling PHP script/file in between two shortcodes

  • Hey everyone

    In Wordpress, I am calling two NextGen Albums using these shortcodes in my Page content:

    [album id=1]
    [album id=2]
    Now I want something in between those two albums. This is fine if it's just HTML:

    [album id=1]
    <p>Here goes some awesome content</p>
    [album id=2]
    So far so good, but what if I want to have some PHP code in there? Obviously I can't add that in the CMS textarea. I tried creating a shortcode, so that it would be like this:

    [album id=1]
    [awesome]
    [album id=2]
    And then I would define the shortcode in FUNCTIONS.PHP. Then what happens? The results of the [awesome] code (no matter how simple) is placed BEFORE the albums?! I also tried defining the shortcode in the NextGen plugin functions, but no luck.

    So in essense, what I need to know....What's the best way of calling a PHP script (or file) from the content area?

    Thanks all,
    mS
  • Figured it out, needed some serious PHP scripting there.