The output is generated from template-files or your own templates, which you can write with Mustache.
Main-advantages:
- Requests are cached
- CSS only included if shortcode found on page
- highly customizable with Mustache-templates
Version 0.8 | Live-Demo | Download from WordPress
Usage
Just insert the following shortcode anywhere in your blog (for use in a widget: use the text-widget and insert the shortcode there)
[flickr_feed]
Attributes
Here’s a list of all attributes the shortcode accepts. Additional attributes may be available depending on the chosen template. Descriptions in italics are cited from the flickr-api-documentation.
- template
- a predefined template consisting of a html- and optionally a css-file in the subdirectory "templates" of the plugin-folder. If left blank the template ‘default’ is chosen.
- If the template-attribute is missing you have to define a template yourself (*). This can be done using the following enclosing shortcut:
[flickr_feed_template]*[/flickr_feed_template]
- Check out the examples below to see how to define your own template.
- user_id
- Restricts the search results to a specific flickr-user
- tags
- A comma-delimited list of tags. Photos with one or more of the tags listed will be returned. You can exclude results that match a term by prepending it with a – character.
- tagmode
- Either ‘any’ for an OR combination of tags, or ‘all’ for an AND combination. Defaults to ‘any’ if not specified. (v0.8+)
- text
- A free text search. Photos who’s title, description or tags contain the text will be returned. You can exclude results that match a term by prepending it with a – character.
- min_upload_date
- Minimum upload date. Photos with an upload date greater than or equal to this value will be returned. The date can be in the form of a unix timestamp or mysql datetime. (v0.8+)
- max_upload_date
- Maximum upload date. Photos with an upload date less than or equal to this value will be returned. The date can be in the form of a unix timestamp or mysql datetime. (v0.8+)
- min_taken_date
- Minimum taken date. Photos with an taken date greater than or equal to this value will be returned. The date can be in the form of a mysql datetime or unix timestamp. (v0.8+)
- max_taken_date
- Maximum taken date. Photos with an taken date less than or equal to this value will be returned. The date can be in the form of a mysql datetime or unix timestamp. (v0.8+)
- license
- The license id for photos [..]. Multiple licenses may be comma-separated.
- sort
- The order in which to sort returned photos. Defaults to date-posted-desc (unless you are doing a radial geo query, in which case the default sorting is by ascending distance from the point specified). The possible values are: date-posted-asc, date-posted-desc, date-taken-asc, date-taken-desc, interestingness-desc, interestingness-asc, and relevance.
- bbox
- A comma-delimited list of 4 values defining the Bounding Box of the area that will be searched. The 4 values represent the bottom-left corner of the box and the top-right corner, minimum_longitude, minimum_latitude, maximum_longitude, maximum_latitude. Longitude has a range of -180 to 180 , latitude of -90 to 90. Defaults to -180, -90, 180, 90 if not specified. Unlike standard photo queries, geo (or bounding box) queries will only return 250 results per page. [?Geo queries require some sort of limiting agent in order to prevent the database from crying. This is basically like the check against "parameterless searches" for queries without a geo component. A tag, for instance, is considered a limiting agent as are user defined min_date_taken and min_date_upload parameters — If no limiting factor is passed we return only photos added in the last 12 hours (though we may extend the limit in the future).]
- group_id
- The id of a group who’s pool to search. If specified, only matching photos posted to the group’s pool will be returned.
- place_id
- A Flickr place id. (not used if bbox argument is present). [?Geo queries require some sort of limiting agent in order to prevent the database from crying. This is basically like the check against "parameterless searches" for queries without a geo component. A tag, for instance, is considered a limiting agent as are user defined min_date_taken and min_date_upload parameters — If no limiting factor is passed we return only photos added in the last 12 hours (though we may extend the limit in the future).]
- has_geo
- Any photo that has been geotagged, or if the value is “0″ any photo that has not been geotagged. [?Geo queries require some sort of limiting agent in order to prevent the database from crying. This is basically like the check against "parameterless searches" for queries without a geo component. A tag, for instance, is considered a limiting agent as are user defined min_date_taken and min_date_upload parameters — If no limiting factor is passed we return only photos added in the last 12 hours (though we may extend the limit in the future).]
- lat
- A valid latitude, in decimal format, for doing radial geo queries. [?Geo queries require some sort of limiting agent in order to prevent the database from crying. This is basically like the check against "parameterless searches" for queries without a geo component. A tag, for instance, is considered a limiting agent as are user defined min_date_taken and min_date_upload parameters — If no limiting factor is passed we return only photos added in the last 12 hours (though we may extend the limit in the future).]
- lon
- A valid longitude, in decimal format, for doing radial geo queries. [?Geo queries require some sort of limiting agent in order to prevent the database from crying. This is basically like the check against "parameterless searches" for queries without a geo component. A tag, for instance, is considered a limiting agent as are user defined min_date_taken and min_date_upload parameters — If no limiting factor is passed we return only photos added in the last 12 hours (though we may extend the limit in the future).]
- radius
- A valid radius used for geo queries, greater than zero and less than 20 miles (or 32 kilometers), for use with point-based geo queries. The default value is 5 (km).
- count
- Define how many pictures the query should return. Defaults to 10 images.
- cache_time
- Specify how long the flickr-results should be cached. Defaults to 15 minutes
- date_format
- Choose the format for the Mustache-tags {{date_upload}} and {{date_taken}}. For more information check out the syntax of PHP-Date-function‘s format-parameter.
- new_window
- Set to true, t or 1 to open any links in a new window. (v0.8+)
- size
- Sets image-size for supporting templates. (the mustache-tags {{image_url}}, {{image_width}}, {{image_height}}, {{image_size}} and {{{image}}} are affected). Possible values: full, large, medium, small, thumb or square
Mustache-Templates
The following components can be used to build your own html-template. Additional components can be generated by inserting custom attributes in the shortcode. The components are only available in the html-template, not in the css-file! Check out the template-files in the plugin to see how it’s still possible to change css-values with custom attributes from your shortcode. For more infos about Mustache-syntax check out the PHP-implementation and the manuals on http://mustache.github.com/
- {{photo_id}}
- Flickr-id of the photo
- {{owner_id}}
- Flickr-id of the owner of the photo
- {{owner_name}}
- Name of the owner of the photo
- {{title}}
- Title of the photo
- {{description}}
- Description of the photo
- {{image_url}}
- url to the image
- {{image_width}}
- width of the image
- {{image_height}}
- height of the image
- {{image_size}}
- html-attribute ‘size’ for the image. Generated using the following template:
- width={{image_width}} height={{image_height}}
- {{{image}}}
- Preformatted img-tag for the image. Generated using the following template:
- <img src=”{{full_image_url}}” alt=”{{title}}” title=”{{title}}” {{full_image_size}} />
- {{full_image_url}}
- url to the full-sized image
- {{full_image_width}}
- width of the full-sized image
- {{full_image_height}}
- height of the full-sized image
- {{full_image_size}}
- html-attribute ‘size’ for the full-sized image. Generated using the following template:
- width={{full_image_width}} height={{full_image_height}}
- {{{full_image}}}
- Preformatted img-tag for the full-sized image. Generated using the following template:
- <img src=”{{full_image_url}}” alt=”{{title}}” title=”{{title}}” {{full_image_size}} />
- {{large_image_url}}
- url to the large-sized image
- {{large_image_width}}
- width of the large-sized image
- {{large_image_height}}
- height of the large-sized image
- {{large_image_size}}
- html-attribute ‘size’ for the large-sized image. Generated using the following template:
- width={{large_image_width}} height={{large_image_height}}
- {{{large_image}}}
- Preformatted img-tag for the large-sized image. Generated using the following template:
- <img src=”{{large_image_url}}” alt=”{{title}}” title=”{{title}}” {{large_image_size}} />
- {{medium_image_url}}
- url to the medium-sized image
- {{medium_image_width}}
- width of the medium-sized image
- {{medium_image_height}}
- height of the medium-sized image
- {{medium_image_size}}
- html-attribute ‘size’ for the medium-sized image. Generated using the following template:
- width={{medium_image_width}} height={{medium_image_height}}
- {{{medium_image}}}
- Preformatted img-tag for the medium-sized image. Generated using the following template:
- <img src=”{{medium_image_url}}” alt=”{{title}}” title=”{{title}}” {{medium_image_size}} />
- {{small_image_url}}
- url to the small-sized image
- {{small_image_width}}
- width of the small-sized image
- {{small_image_height}}
- height of the small-sized image
- {{small_image_size}}
- html-attribute ‘size’ for the small-sized image. Generated using the following template:
- width={{small_image_width}} height={{small_image_height}}
- {{{small_image}}}
- Preformatted img-tag for the small-sized image. Generated using the following template:
- <img src=”{{small_image_url}}” alt=”{{title}}” title=”{{title}}” {{small_image_size}} />
- {{square_image_url}}
- url to the square-sized image
- {{square_image_width}}
- width of the square-sized image
- {{square_image_height}}
- height of the square-sized image
- {{square_image_size}}
- html-attribute ‘size’ for the square-sized image. Generated using the following template:
- width={{square_image_width}} height={{square_image_height}}
- {{{square_image}}}
- Preformatted img-tag for the square-sized image. Generated using the following template:
- <img src=”{{square_image_url}}” alt=”{{title}}” title=”{{title}}” {{square_image_size}} />
- {{thumb_image_url}}
- url to the thumb-sized image
- {{thumb_image_width}}
- width of the thumb-sized image
- {{thumb_image_height}}
- height of the thumb-sized image
- {{thumb_image_size}}
- html-attribute ‘size’ for the thumb-sized image. Generated using the following template:
- width={{thumb_image_width}} height={{thumb_image_height}}
- {{{thumb_image}}}
- Preformatted img-tag for the thumb-sized image. Generated using the following template:
- <img src=”{{thumb_image_url}}” alt=”{{title}}” title=”{{title}}” {{thumb_image_size}} />
- {{buddy_icon_url}}
- url of the owner’s buddy-icon
- {{buddy_icon_size}}
- html-attribute ‘size’ for the buddy-icon
- {{{buddy_icon}}}
- Preformatted img-tag for the buddy-icon. Generated using the following template:
- <img src=”{{buddy_icon_url}}” alt=”{{owner_name}}” title=”{{owner_name}}” {{buddy_icon_size}} />
- {{has_geo}}
- can be used in the template to check if image is geotagged (true/false)
- {{latitude}}
- latitude (for geotagged images)
- {{longitude}}
- longitude (for geotagged images)
- {{place_id}}
- flickr-place-id (for geotagged images)
- {{tags_raw}}
- flickr-tags of the photo (only text)
- {{{tags_owner}}}
- flickr-tags linked to owner’s other content with same tags
- {{{tags_everyone}}}
- flickr-tags linked to other flickr-content with same tags
- {{views}}
- View-count of the flickr-photo
- {{date_upload_raw}}
- raw upload date
- {{date_upload}}
- formatted upload date
- {{date_taken_raw}}
- raw picture-taken date
- {{date_taken}}
- formatted picture-taken date
- {{license_id}}
- flickr-id of the photo’s license
- {{license_name}}
- name of the photo’s license
- {{license_url}}
- url of the photo’s license
- {{{license}}}
- Preformatted name of the license with link to its url. Generated using the following template:
- <a href=”{{license_url}}” target=”_blank”>{{license_name}}</a>
- {{photo_url}}
- url to the photo-page on flickr
- {{owner_url}}
- url to the owner’s photo-page on flickr
- {{profile_url}}
- url to the owner’s profile-page on flickr
- {{{owner}}}
- Preformatted name of the owner linked to his/her photo-page on flickr. Generated using the following template:
- <a href=”{{owner_url}}”>{{owner_name}}</a>
/dd
Preformatted img-tag for the large-sized image. Generated using the following template:

By any chance would you be able to fix the broken image URL links? If not, can you point me to a place in your plugin where this is happening so I can fix it?
Thanks for the plugin!
Great plugin. The open in new window function doesn't seem to work tho. Not in the galleria template anyway. Any help?
I found a workaround: <?php echo do_shortcode( '[flickr_feed]' ) ?>
This plugin looks awesome, but I don't see any attributes about flick photo sets? I want to include only pictures from a particular photo set—is that possible? Also, can I insert code (php / function / call) directly into a template theme, instead of using short code?
Links to images from a group are now broken — flickr changed the URL format, I think…