Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Quotes post type
<?php
/**
* Create Quotes post type
*
* @link http://codex.wordpress.org/Function_Reference/register_post_type
*
*/
function be_register_quotes_post_type() {
$labels = array(
'name' => 'Quotes',
'singular_name' => 'Quote',
'add_new' => 'Add New',
'add_new_item' => 'Add New Quote',
'edit_item' => 'Edit Quote',
'new_item' => 'New Quote',
'view_item' => 'View Quote',
'search_items' => 'Search Quotes',
'not_found' => 'No Quotes found',
'not_found_in_trash' => 'No Quotes found in trash',
'parent_item_colon' => '',
'menu_name' => 'Quotes'
);
$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','thumbnail','excerpt')
);
register_post_type( 'quotes', $args );
}
add_action( 'init', 'be_register_quotes_post_type' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment