Cutome Post

// Help  URL : http://codex.wordpress.org/Function_Reference/register_post_type
// Put This Code into function.php
add_action( ‘init’, ‘slider_custom_init’ );
function slider_custom_init() {
$labels = array(
‘name’ => _x(‘Slider’, ‘post type general name’),
‘singular_name’ => _x(‘Slider’, ‘post type singular name’),
‘add_new’ => _x(‘Add New Slider’, ‘student’),
‘add_new_item’ => __(‘Add New Slider’),
‘edit_item’ => __(‘Edit Slider’),
‘new_item’ => __(‘New Slider’),
‘all_items’ => __(‘All Slider’),
‘view_item’ => __(‘View Slider’),
‘search_items’ => __(‘Search Slider’),
‘not_found’ =>  __(‘No Slider found’),
‘not_found_in_trash’ => __(‘No  Slider found in Trash’),
‘parent_item_colon’ => ”,
‘menu_name’ => ‘Slider’

);

$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’ => true,
‘menu_position’ => null,
‘supports’ => array( ‘title’, ‘editor’, ‘author’, ‘thumbnail’, ‘excerpt’,

‘comments’,’page-attributes’,’custom-fields’ )
);

register_post_type(‘slider’,$args);
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: