• Hi,
    I have NextGEN gallery and NextGEN flash viewer plugins installed.

    I created several galleries with NextGEN and each gallery needs to be displayed on its own page with the simpleviewer function. The gallery ID names are the same as the page ID names (permalinks).

    What I would like is to have some php code in the page template that checks the page name and then displays the gallery with the same name.

    If I put [simpleviewer=3] inside the page via the admin panel it will work. But I would prefer to get it in there via the template. And not use the number of the gallery, but the name.

    Any ideas ? Thanks in advance.

Viewing 1 replies (of 1 total)
  • Thread Starter Joke De Winter

    (@dewinter)

    Hello anybody home ?

    Anyway I made a bit of progress in the meantime. I came up with a query that allows me to figure out what the gallery id is of the gallery attached to the page. This number is stored in a variable $value.

    When I use the following code to display the gallery, nothing happens:

    $showgallery = '[gallery=$value]';
    $showgallery = apply_filters('the_content', $showgallery );
    echo $showgallery;

    It only seems to work with a digit, but that’s not convient in this case.

    Anybody ? Thanks.

Viewing 1 replies (of 1 total)
  • The topic ‘How to place simpleviewer shortcode inside template and not the post ?’ is closed to new replies.