wordpress snippets last updated   : October 6, 2014
we now have 641 snippets

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

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

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

Count total number of jpg, gif, png images in media library

wordpress snippet

Adding the first snippet to the functions.php of your wordpress theme will display a count of all images within the media library. Add the second snippet in the location you wish to display the count total.

read more

List all unattached files in media library

wordpress snippet

Adding the first snippet to the functions.php of your wordpress theme then add the second snippet into your wordpress template. Once added this snippet will display thumbnails of unattached image files and links to other file types.

read more

Add media library column with image width and height

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add a new column to the media library that will display the images width and height.

read more