updated   : May 15, 2012
we now have 588 snippets
category loop
By : , on December 23, 2011 9:00 am

Display attachment thumbnail with image metadata

wordpress snippet

Adding this snippet within the loop of your index.php template file will display a list of all post attachments with the following metadata (Credit, Camera, Focal Length, Aperture, ISO, Shutter Speed, Time Stamp, Copyright).

read more
By : , on December 12, 2011 9:00 am

Attach images with simple thumbnail selection metabox

wordpress snippet

A little snippet I wrote recently to easily attach images to posts with a simple thumbnail selection metabox. Add the first snippet to the functions.php of your wordress theme. Place the second snippet within the loop of your wordpress theme to display the images in your posts or pages.

read more
By : , on December 01, 2011 9:00 am

Conditionally display content on last post

wordpress snippet

Adding this snippet within the loop of your wordpress theme will let you display something only if it is on the last posts.

read more
By : , on November 30, 2011 9:00 am

Automatically wrap images in the_content with custom html

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will automatically wrap images in the_content with any custom HTML that you wish.

read more
By : , on November 11, 2011 9:00 am

Add class to next and previous post_link

wordpress snippet

I recently needed to use this for a theme I was building figured I would post the results up here for everyone. Adding this snippet to the functions.php of your wordpress theme will add a custom class to next and previous post_link.

read more
By : , on October 24, 2011 9:00 am

Microformatted and HTML5 compliant loop

wordpress snippet

Why not replace your existing wordpress loop within your theme to a microformatted and HTML5 compliant loop.

read more
By : , on September 29, 2011 9:00 am

Display post format in your theme

wordpress snippet

Adding this snippet to your wordpress theme will display the post format or ‘standard’ if no post format is available.

read more
By : , on September 27, 2011 9:00 am

Display specific content if post has_tag or specific tag

wordpress snippet

Adding this snippet within the loop of your wordpress template will let you display specific content if a post has tags or not. Also note that has_tag(‘tag_name’) suports, tag name, term_id or slug and an array of tag names, term ids and slugs. Also a big thanks to Jeremy for submitting the following.

read more