Tagged: custom-posts RSS Toggle Comment Threads | Keyboard Shortcuts
-
Rahul Bansal
-
Pradeep
Quick tip for using custom post types options
I am using custom post type for my new project.. As you know, we get all the features of normal post
editing in the custom post type.. For example if I want to have Stories as a custom post type, I will
get all the post features separately for my custom post type..
This is just by registering post type using register_post_type() function.
We can hide/remove some of the post features like comments, excerpt, thumbnails, etc. if we want.
by overriding the register_post_types arguments..
This is how I did..
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => true,
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => false,
'menu_position' => null,
'supports' => array('title','excerpt')
);
register_post_type('Special',$args);
As you can see, I have added “Special” custom post type, and providing only title and excerpt
by setting ‘supports’..-
Prasad
-
-
kapil.gonge
-
Rahul Bansal
-
Santosh
I liked Custom Post Type UI http://wordpress.org/extend/plugins/custom-post-type-ui/
-
Good one keep on sharing!