updated   : May 15, 2012
we now have 588 snippets
category media
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 May 04, 2012 9:20 am

Remove unneeded images / thumbnail sizes

wordpress snippet

Adding some or all of these lines of code to the functions.php of your wordpress theme will effectively remove some of the default images sizes that may be unneeded. Make sure to include both the _w _h for width and height,

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 20, 2011 9:00 am

Media library admin columns with attachment id

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add a new column within the media library admin columns with the attachment id.

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

Display post attachment count in admin column

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will display the post attachment count in a custom admin column.

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

Add HTML to feature image metabox

wordpress snippet

Adding this snippet to the functions.php will let you add HTML to the featured image metabox. This could be use to add extra information for your clients on how to use this feature.

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

Add a custom class to wp_get_attachment_link

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add a custom class to wp_get_attachment_link.

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