• Resolved Jim R

    (@jim-r)


    I will be using this plugin on a Tag Archive page within my WordPress site. I would like the Tag name for that page to be the same used by this plugin. So if you click on John Doe’s name it takes the User to a page where all the Posts tagged with John Doe’s name are, and I would also like to see pictures of John Doe as well.

    So basically I would like the short code to look like:

    [slickr-flickr tag= $name]

    instead of…
    [slickr-flickr tag=”bahamas”]

    Will that work?

Viewing 1 replies (of 1 total)
  • Plugin Author Russell Jamieson

    (@powerblogservice)

    Hi Jim,

    No. WordPress will not substitute variables automatically into short codes.

    However, you can achieve the same effect by installing the Exec-PHP plugin and rather than using the slickr-flickr short code call PHP directly instead

    Something like..

    <?php
    if(get_query_var('author_name')) :
        $curauth = get_user_by('slug', get_query_var('author_name'));
    else :
        $curauth = get_userdata(get_query_var('author'));
    endif;
    $name = $curauth->user_nicename; //for example
    echo slickr_flick_display(array('tag' => $name) );
    ?>

    This assumes that you put the required tag in the $name variable.

    Hope this helps.

    BTW, please post any questions on my plugin site, http://slickr-flickr.diywebmastery.com as that way you will get a quicker response, as I get an automatic email where there is a question.

    Thanks

    Regards

    Russell

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Slickr Flickr] Using a variable instead of a tag…’ is closed to new replies.