Created
January 1, 2012 14:25
-
-
Save billerickson/1547460 to your computer and use it in GitHub Desktop.
Quotes post type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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