Pippins Plugins
  • Email
  • Facebook
  • Feedburner
  • Github
  • Google
  • Twitter
  • Vimeo
  • Youtube
  • Rss
  • About
  • News
  • Join the Site
    • Member Benefits
    • Member Plugins
    • Email Notifications
  • Plugin Store
    • Affiliate Area
    • Checkout
  • Plugins
    • Plugin Portfolio
      • Plugin Portfolio – List View
    • Free
    • Premium
    • Member Plugins
    • Coding Standards
    • Get Plugin Support
  • Tutorials
    • Series
      • Plugin Development 101
      • Creating a User Follow System Plugin
      • Customizing Restrict Content Pro
      • Displaying Content with Easy Content Types
      • Writing Your First WordPress Plugins, Basic to Advanced
      • Working with Widgets
      • User Submitted Image Galleries
      • Plugin Thoughts
      • Integrating Stripe.com with WordPress
      • WordPress Rewrite API
    • Member Exclusive
      • Free Members
      • Subscriber Only
    • Difficulty
      • Beginner
      • Intermediate
      • Advanced
    • Action and Filter Hooks
    • Ajax
    • Custom Post Types
    • External APIs
    • Short Codes
    • Taxonomies
    • Video Tutorials
    • Widget Tutorials
    • WordPress Admin / Dashboard
    • Working with jQuery
    • WordPress Database
    • Writing Plugins
    • Tag Index
  • Reviews
  • Support Forum
  • Contact
    • Support the Site
    • Request Code Review
    • Plugin Support

Simple Flickr Display Plugin

Posted on July 21, 2011 by Pippin in Beginner, Free, Plugins, Quick Tips, Social, Tutorials, Utilities No Comments
Home» Tutorials » Beginner » Simple Flickr Display Plugin
Tweet
Love It - 0

Ever wanted a function to display your Flickr photos anywhere you want? This quick plugin will give you exactly that: a simple function that you can place anywhere in your template that you want to display a list of photos from a Flickr account.


This is a quick tip. Check out more Quick Tips

1
2
3
4
5
6
7
8
9
10
11
/*
* Display a user's flickr photos
*
* @param - string - $user - The ID of the user to display
* @oaram - string - $size - The image size to show. s,m,t are valid options
* @param - string - $display - either "latest" or "random"
* @param - integer - $count - the number of photos to show. Between 1 and 10
*/
function simple_flickr_display($user = '', $size = 's', $display = 'latest', $count = 10) {
	echo '<script type="text/javascript" src="http://www.flickr.com/badge_code_v2.gne?count=' . $count . '&amp;display=' . $display .'&amp;size=' . $size .'&amp;layout=y&amp;source=user&amp;user=' . $user . '"></script>';
}

To display the photo stream, simply place the function in one of your templates like this:

1
simple_flickr_display($user = 'yourUserID');

Or if you want to customize it a little more, you can change the default parameters:

1
simple_flickr_display($user = 'yourUserID', $size = 'm', $display = 'random', $count = 5);

You can easily find your user ID by going to your public photo stream and looking at the URL. For example, my public stream is at: http://www.flickr.com/photos/59968725@N03/, and my user ID is 59968725@N03.

I hope you find this useful, and keep your eyes open because I will be releasing a greatly enhanced version of this plugin that includes a widget sometime very soon.

Download the function as a complete plugin below.

Download
Tweet Follow @pippinsplugins
flickr, photos

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Login

Lost your password?

Please enter your username or e-mail address. You will receive a new password via e-mail.

  • Facebook Become a Fan Like

  • Twitter Subscribe on Twitter Follow

  • YouTube Follow my Videos Subscribe

  • RSS Feed Subscribe with RSS Subscribe

Easy Digital Downloads

Most Loved

  • Love It Pro for WordPress
  • Write a “Love It” Plugin with Ajax to Let Users Love Their Favorite Posts / Pages
  • Simple Notices Pro Plugin for WordPress
  • User Bookmarks for WordPress
  • Front End Registration and Login Forms Plugin

Similar Plugins and Posts

Sorry, no related items found.

Latest Premium Content

  • Plugin Development 101 – Introduction to Adding Dashboard Menus
  • Plugin Development 101 – Intro to Loading Scripts and Styles
  • User Follow System – Part 5
  • Plugin Development 101 – Intro to Short Codes
  • Plugin Development 101 – Registering a Custom Post Type
  • Plugin Development 101 – Intro to Actions

Latest Tutorials

  • Test Your Plugins with RTL (0)

    Right-To-Left languages are those that...

  • Submitting Your First Pull Request to a WordPress Plugin on Github (5)

    Github is an extremely popular tool for managing WordPress plugins, and one...

  • Plugin Development 101 – Introduction to Adding Dashboard Menus (1)

    Adding new menus, both top level and sub level, to the WordPress Dashboard is a really common task for plugins...

Enter your email to receive automated updates when new posts are published

Latest Tweets

  • @HipHopMakers should be back shorlty
    May 25, 2013
  • @mrpritchett good idea. Not in the plugin currently but I like the odea
    May 25, 2013
  • @mrpritchett what kind of short codes?
    May 25, 2013

Topics

hook meta box Rémi Corson featured shortcodes campaign monitor add_options_page register_setting Sugar Event Calendar attachments add_shortcode wp_enqueue_script the_content image forms short codes Related posts login do_action authors mail chimp attachment plugin recent posts comments post types bbpress apply_filters short code taxonomies custom post type Ajax images gallery Stripe jquery taxonomy users widgets add_filter easy content types add_action widget restrict content pro easy digital downloads

Weekly Newsletter

Useful Links

  • Join the Site
  • Plugin Store
  • Affiliate Area
  • Tag Index
  • Support the Site
  • Suggest a Tutorial
  • Random Post
  • Contact

Monthly Archives

(c) 2013 Pippin's Plugins