Shortcode Question about using a Plugin
-
I am using a plugin that brings images from my flickr account into my WP site in a masonry-like format. Specifically, I want to bring in just my images from a particular set. That’s easy with this plugin with this shortcode:
[flickr_set id="72157626926458136"]
The instructions that come with the plugin (Flickr Justified Gallery) show that it’s also able to either bring in or exclude images with particular tags. The shortcode listed for that is:
[flickr_tags user_id="67681714@N03" tags="cat, square, nikon"]
The instructions say you can exclude any images with a particular tag by placing a “-” before the tag (i.e. -landscape).
What I want to do is to import images from a particular set but exclude all images that have a particular tag within the set (not my whole photostream).
Using both shortcodes doesn’t work. Because the flickr_tag syntax uses user id, when I use both, it will first display all the images in my set, then it will display underneath all the images in my whole photostream except the images tagged with “landscape.”
My question: is there a way to exclude the images tagged “landscape” just from my set and not my whole photostream?
I’ve played around with the code for the plugin itself but to no avail. Here’s the code that I think is responsible for the returns. And I don’t know enough to be able to rewrite this to do what I want it to do. Is it possible? Here’s the code I think is the area I need to work on:
//[flickr_photostream user_id="..." ...] function fjgwpp_flickr_photostream($atts, $content = null) { return fjgwpp_createGallery('phs', $atts); } add_shortcode('flickr_photostream', 'fjgwpp_flickr_photostream'); add_shortcode('flickrps', 'fjgwpp_flickr_photostream'); //legacy tag //[flickr_set id="..." ...] function fjgwpp_flickr_set($atts, $content = null) { return fjgwpp_createGallery('set', $atts); } add_shortcode('flickr_set', 'fjgwpp_flickr_set'); //[flickr_gallery user_id="..." id="..." ...] function fjgwpp_flickr_gallery($atts, $content = null) { return fjgwpp_createGallery('gal', $atts); } add_shortcode('flickr_gallery', 'fjgwpp_flickr_gallery'); //[flickr_tags user_id="..." tags="..." tags_mode="any/all" ...] function fjgwpp_flickr_tags($atts, $content = null) { return fjgwpp_createGallery('tag', $atts); } add_shortcode('flickr_tags', 'fjgwpp_flickr_tags'); //[flickr_group id="..."] function fjgwpp_flickr_group($atts, $content = null) { return fjgwpp_createGallery('grp', $atts); } add_shortcode('flickr_group', 'fjgwpp_flickr_group'); //Options include("flickr-justified-gallery-settings.php"); ?>
I am not a coder but I can understand the variables and the syntax of code fairly well. If I need to show you the entire code for this plugin, let me know. Thanks for your help.
- The topic ‘Shortcode Question about using a Plugin’ is closed to new replies.