wordpress snippets last updated   : April 14, 2014
we now have 630 snippets

Add a Class to ‘the_post_thumbnail’ a Featured Image

wordpress snippet

When adding a featured image to a template, you may want to add a class to the image tag that is being generated. This extra class will allow you to use CSS to format it better.

read more

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

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

Remove support for specific post type features

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will remove support for the specific features bellow from specified post types. Change the word ‘post’ to anything you like including a custom post type name or the default post, page.

read more

Add youtube thumbnail posts with custom metabox

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add a new metabox to your posts that will let you add a youtube video ID eg: oHg5SJYRHA0 to display a thumbnail.

read more

Remove thumbnail support from a specific post type

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will remove thumbnail support from a specific post type. Change POST_TYPE text to either a custom post type name or post, page to remove support for thumbnails.

read more
jqsnipp.com | we just launched jquery snippets website