updated   : April 22, 2013
we now have 608 snippets
Kevin Chard
Kevin Chard is the editor and founder of wpsnipp. You can follow wpsnipp on , Twitter, Facebook, or you can subscribe to our RSS feed or RSS via email.
By : , on April 22, 20139:00 am

Shortcode to embed google trends graph in posts and pages

This Google trends shortcode will embed a graph of any comma separated query you enter to display a trend over time. Make sure to add a + between multiple words that are part of a single query. By default the geolocation is set to United States so change geo praram for another location.

read more
By : , on January 03, 20139:00 am

Add pinterest “Pin It” button to your wordpress blog

Adding a pinterest button to a wordress blog is simple! Place the first snippet in the functions.php of your wordpress theme. Once that is done add the next snippet into the location you wish to display the Pint It button within the single.php template file.

read more
By : , on August 30, 20129:00 am

Exclude pages from admin edit pages list

This is a great little snippet that will exclude pages based on the the ID from the admin pages list. Just add this snippet to the functions.php of your wordpress theme and update the array with the page ID’s you wish to hide. Please note this does not stop a post from being editable this snippet only hides the page from view.

read more
By : , on April 22, 20139:00 am

Shortcode to embed google trends graph in posts and pages

This Google trends shortcode will embed a graph of any comma separated query you enter to display a trend over time. Make sure to add a + between multiple words that are part of a single query. By default the geolocation is set to United States so change geo praram for another location.

read more
By : , on January 03, 20139:00 am

Add pinterest “Pin It” button to your wordpress blog

Adding a pinterest button to a wordress blog is simple! Place the first snippet in the functions.php of your wordpress theme. Once that is done add the next snippet into the location you wish to display the Pint It button within the single.php template file.

read more
By : , on August 30, 20129:00 am

Exclude pages from admin edit pages list

This is a great little snippet that will exclude pages based on the the ID from the admin pages list. Just add this snippet to the functions.php of your wordpress theme and update the array with the page ID’s you wish to hide. Please note this does not stop a post from being editable this snippet only hides the page from view.

read more
By : , on August 07, 20129:00 am

Force specific pages to be secure, ssl, https

You can easily force specific pages to be secure in wordpress using the following simple little snippet. Just add the following snippet to the functions.php of your wordpress theme and specify the post / page ID desired.

read more
By : , on July 30, 20129:00 am

Remove / unset URL field from comment form

Removing the URL field from your comments form is a simple snippet just add this code to the functions.php of your wordpress theme to remove the URL / website field.

read more
By : , on July 17, 20129:30 am

Display $hook_suffix as admin notice

When developing in wordpress you may have a need for the hook_suffix that can later be used to register a hook called on a particular page load-hook_suffix. Just add this wordpress snippet to the functions.php of your wordpress theme and enable and disable as needed when working on a project.

read more
By : , on July 16, 20129:00 am

Remove buttons from add media popup

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
By : , on July 11, 20129:30 am

Redirect admin pages to any location

Redirecting the admin pages was something I needed to do for a recent project. The following snippet will let you redirect any of the admin pages to any location you wish based on the user ‘capability’. Another option would be to replace wp_redirect with wp_die(“some custom message”); to display a message instead of redirecting.

read more