Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other WordPress: calling PHP script/file in between two shortcodes

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #37474
    Senff
    Participant

    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]

    Here goes some awesome content


    [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

    #100659
    Senff
    Participant

    Figured it out, needed some serious PHP scripting there.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Other’ is closed to new topics and replies.