wordpress snippets last updated   : September 29, 2014
we now have 639 snippets

Upload user-submitted files from the frontend

wordpress snippet

There are many use cases for allowing users to upload files from the frontend, but the trick is making sure the file is uploaded and saved in the WordPress media library correctly. You can easily use standard PHP functions to handle the upload and then store the file wherever you like, but then you won’t be able to take advantage of the attachment system that WordPress uses. An image that is uploaded correctly, for example, will have all the various sizes available as well as the meta data, such as title, description and caption. You will also be able to edit all of this from the media library in your WordPress dashboard.

read more

Remove image sizes from media upload gallery

wordpress snippet

This snippet will let you remove image sizes from media upload gallery very similar to a recent post that will show you how to add custom image sizes to the media upload gallery.

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 buttons from add media popup

wordpress snippet

Run into this snippet not to long ago that will let you remove every button from add media popup. This will remove all but the delete button from the media popup so have fun and enjoy.

read more

Use gettext, ngetext to replace array of words in wp admin

wordpress snippet

Simple but useful method using gettext, ngetext filter to replace an entire array of words within the wordpress admin. Just update the array key with the item you wish to replace and the array value with the text to replace it with. Add this snippet to the functions.php of your wordpress theme.

read more

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
jqsnipp.com | we just launched jquery snippets website