updated   : May 15, 2012
we now have 588 snippets
By : , on May 07, 2012 9:00 am

Remove inline style from gallery shortcode

wordpress snippet

The WordPress gallery shortcode will add some inline CSS to your document however if I’m like many of you, I would rather use my own. Adding the above snippet to the functions.php of your wordpress theme will disable the default gallery styles from being inserted into the page.

read more
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 21, 2011 9:00 am

Display EXIF metadata in media library admin column

wordpress snippet

For anyone that uses wordpress for photography you should find this snippet useful. Adding this snippet to the functions.php of your wordpress theme will create a new column within the media library that will display EXIF metadata. Including, (credit, camera, focal length, aperture, iso, shutter speed, timestamp, 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 November 02, 2011 9:00 am

Remove “From computer” tab for posts with existing attachments

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will remove the “From computer:” tab from posts within existing attachments.

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

Display a custom post type’s media library inline

wordpress snippet

Adding this snippet to the functions.php of your wordress theme will display a custom post type’s media library inline. This is a great little trick that will display the gallery using an iframe and will function exactly the same as the popup does.

read more
By : , on May 23, 2011 9:00 am

Linking to all image sizes Flickr style

wordpress snippet

Adding this snippet to your wordpress theme will automatically link to all image sizes. Add the first snippet to the functions.php of your wordpress theme. Then add the second snippet to the image.php or attachment.php template of your wordpress theme.

read more
By : , on November 09, 2010 9:00 am

Gallery shortcode remove css

wordpress snippet

Adding this PHP code to your function.php will remove the CSS wordpress adds when using the gallery shortcode.

read more