Remove unneeded images / thumbnail sizes
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 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 morethis months featured snippets
Remove p tag from around images in the_content
Adding this snippet to the functions.php of your wordpress theme will remove the HTML p tag from around images in the_content.
read moreDisplay screenshot of any website using shortcode
Adding the first snippet to the functions.php of your wordpress theme will let you use the bellow shortcode to display a screenshot of any website.
read moreAdd rel=”lightbox” to all images embedded in a post
Adding this snippet to the functions.php of your wordpress theme will add a rel=”lightbox” attribute to all images embedded in your post. Also note that on line 05 you can change the rel=”lightbox” to whatever you need as some image viewer scripts will use rel=”thumbnail” for example. This snippet will also add the post title as the title attribute of the images anchor tag.
read moreAttachment window hide buttons and input fields
Adding this snippet to the functions.php of your wordpress theme will allow you to hide buttons and input fields within the media attachment window.
read moreRestrict uploads to specified file types only, jpg, gif
Adding this snippet to the functions.php of your wordpress theme will allow you to restrict uploads to an array of specified mime types only. This sample only allows jpg and gif images, adding a new line for png eg: ‘png’ => ‘image/png’, would then allow png images.
read more












