Flickr Gallery
How to pass variables & do_shortcode (2 posts)

  1. prae5
    Posted 4 years ago #

    Using the plugin and it works great in pages and posts :)

    I'm putting together a few post templates and am having a few issues passing variables to the plugin. I want to pass a a list of tags to it, but can't seem to work out how to do it.

    Can I reference the plugin using a php function (i can't find anything) or is it just the shortcode available?

    This is what I'm currently trying to do - if anyone has better suggestions I'm open to them.....

    This works:

     echo do_shortcode('[flickr-gallery mode=tag tags=MYTAGS tag_mode=all]');

    Taking this a step further I want to pass a list of tags to the shortcode, but it doesn't work:

    echo do_shortcode('[flickr-gallery mode=tag tags=$myTags tag_mode=all]');

    All help and suggestions appreciated :)



  2. prae5
    Posted 4 years ago #

    OK, this sort of works - but the plugin only seems to use the first item passed.

    echo do_shortcode('[flickr-gallery mode=tag tags="'.$myTags.'" tag_mode=all]'); ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Flickr Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic