WordPress tutorials: Custom post types

Wpsnipp – Now with version 3.0, things are taken a bit further with the option of creating panels for your custom post types. In this tutorial, we will show you how to implement Custom Post types in your site into your WordPress site.Adding this to your functions.php will enable product as a new post type like posts & pages. This is a great new feature in wordpress 3.0

 

 

$args = array(
'label' => __('Products'),
'singular_label' => __('Product'),
'public' => true,
'show_ui' => true,
'capability_type' => 'page',
'hierarchical' => false,
'rewrite' => true,
'query_var' => 'products',
'supports' => array('title', 'thumbnail')
);
register_post_type( 'product' , $args );

Leave a comment