Custom Post Types are by far the simplest way to quickly organize and expand WordPress.
This is especially true when you are trying to create a content management system (CMS) for a customer.
There isn’t a single website that I have created that I haven’t created a custom post type to help organize the back end.
However; it is also key (for me at least) to set up the beginnings of a website as quickly and expeditiously as possible. The design (for me) is always what takes the longest. I want to get the programming out of the way, as soon as possible so I can work on ensuring the site is optimized for search engines (SEO) and laid on in the way the client wants.
For the most part, I keep this code handy. Below is an example of the code I used on this custom post type. (TIPS)
Create a custom post type :
add_action( 'init', 'tips_post_type' ); function tips_post_type() { register_post_type( 'Tips', array( 'labels' => array( 'name' => __( 'Tips', 'kembel' ), 'singular_name' => __( 'Tip', 'kembel' ), ), 'exclude_from_search' => false, 'has_archive' => true, 'hierarchical' => true, 'capability_type' => 'page', 'menu_icon' => 'http://kembel.ca/favicon.ico', 'public' => true, 'rewrite' => array( 'slug' => 'tips' ), 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'page-attributes', 'genesis-seo' ), ) ); }