wordpress snippets last updated   : April 22, 2014
we now have 631 snippets
category functions.php

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

Change admin post/page color by status – draft, pending, published, future, private

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will change the background colors of the post / page within the admin based on the current status. Draft, Pending, Published, Future, Private.

read more

Add nofollow attribute to category specific links

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add the nofollow attribute to category specific links within the_content.

read more

Dynamically create and attach sidebars to pages or posts

wordpress snippet

This is a bit large for the snippets I normally post however very useful. This snippet will let you easily create new sidebars by simply adding the name to an array. You will also be able to define the dynamically created sidebar a page loads by selecting from the custom sidebar selection metabox.

read more

Add custom field automatically when post or page is publish

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add a custom field to a post or page when published. Don’t forget to update the FIELD_NAME and the CUSTOM VALUE.

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