updated   : May 15, 2012
we now have 588 snippets
By : , on January 05, 2012 9:00 am

Add custom post types to archives page

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will let you add custom post types to archives page.

read more
By : , on November 22, 2011 9:00 am

Start date, End date, metabox for events custom post types

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add three metaboxes to your events custom post type “Start date, End date, Location”. This is a great snippet of code by Devin I found just the other day. Take a look at his blog post for even more details about setting up an events custom post type.

read more
By : , on November 18, 2011 9:00 am

Adding custom post types to wp_get_archives()

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will enable wp_get_archives to display your custom post types. Don’t forget to update your custom post type name on line 06.

read more
By : , on July 30, 2011 9:00 am

Check for post type within loop using get_post_type

wordpress snippet

Adding this snippet within the loop of your wordpress theme will let you conditionally check for a specific post type. Just change the post type ‘products’ or ‘people’ to the post type you would like.

read more
By : , on May 21, 2011 9:00 am

Display custom post type menu as submenu

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add a new custom post type however you may notice the ‘show_in_menu’ => ‘edit.php’,. This option will display the custom post type as a submenu within the post edit menu.

read more
By : , on May 09, 2011 9:00 am

Add custom post types to your sites main RSS feed

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will include the specified custom post types within your primary RSS feed.

read more
By : , on May 06, 2011 9:00 am

Create multiple search templates for custom post types

wordpress snippet

Adding these snippets to your wordpress theme will enable you to setup multiple search templates for custom post types.

read more
By : , on April 23, 2011 9:00 am

Change custom post type icon for new and edit post pages

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will change the default icon on the post edit and new post pages. Don’t forget to change the URL on line 9 to the location of your 24px by 24px icon.

read more