Check if post / page has a gallery
Adding this snippet to your wordpress theme will let you check to see if a post contains the gallery shortcode. Add this code to the single.php template of your wordpress theme inside the loop.
read moreRemove inline style from gallery shortcode
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 morethis months featured snippets
Display attachment thumbnail with image metadata
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 moreDisplay EXIF metadata in media library admin column
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 moreAttach images with simple thumbnail selection metabox
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 moreRemove “From computer” tab for posts with existing attachments
Adding this snippet to the functions.php of your wordpress theme will remove the “From computer:” tab from posts within existing attachments.
read moreDisplay a custom post type’s media library inline
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 morelast months featured snippets
Linking to all image sizes Flickr style
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



















