CUSTOM POST TYPE WORDPRESS

function my_custom_post_friend() {
    $labels = array(
        ‘name’               => _x( ‘Friends’, ‘post type general name’ ),
        ‘singular_name’      => _x( ‘Product’, ‘post type singular name’ ),
        ‘add_new’            => _x( ‘Add New Friend’, ‘book’ ),
        ‘add_new_item’       => __( ‘Add New Friend’ ),
        ‘edit_item’          => __( ‘Edit Friend’ ),
        ‘new_item’           => __( ‘New Friend’ ),
        ‘all_items’          => __( ‘All Friends’ ),
        ‘view_item’          => __( ‘View Friend’ ),
        ‘search_items’       => __( ‘Search Friends’ ),
        ‘not_found’          => __( ‘No Friends found’ ),
        ‘not_found_in_trash’ => __( ‘No Friends found in the Trash’ ),
        ‘parent_item_colon’  => ”,
        ‘menu_name’          => ‘Friends’
    );
    $args = array(
        ‘labels’        => $labels,
        ‘description’   => ‘Friends Data’,
        ‘public’        => true,
        ‘menu_position’ => 5,
        ‘supports’      => array( ‘title’, ‘editor’, ‘thumbnail’, ‘excerpt’, ‘comments’ ),
        ‘has_archive’   => true,
    );
    register_post_type( ‘friend’, $args );    
}
add_action( ‘init’, ‘my_custom_post_friend’ );

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