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

Attach PDF files to post with custom metabox file selection

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will create a new metabox within your post editing screen with a select menu listing all PDF files. Adding the second snippet in your wordpress template in the location you wish to display the files URL.

read more

Enable google docs shortcode for .pdf documents

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will setup [pdf] shortcode to link PDF documents to Google docs online viewer.

read more

Display total number of PDF files in your media library

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will return the total number of PDF files within your media library.

read more

Add Google doc’s shortcode for psd, ai, svg, and more

wordpress snippet

On Friday I posted a great snippet by Joen Asmussen the Google PDF shortcode. I wanted to post an updated version primarily because the Google online viewer supports many more file types not just PDF. The supported types are .DOC, .DOCX, .XLS, .XLSX, .PPT, .PPTX, .PDF, .PAGES, .AI, .PSD, .TIFF, .DXF, .SVG, .EPS, .PS, .TTF, .XPS I added a class attribute to the shortcode that you could use to display an icon for the file type link or style the links with the default icon class.

View sample PSD with Google viewer.

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