Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created January 1, 2012 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/1547460 to your computer and use it in GitHub Desktop.
Save billerickson/1547460 to your computer and use it in GitHub Desktop.
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