Created
October 21, 2011 16:01
-
-
Save Ravenna/1304208 to your computer and use it in GitHub Desktop.
functions.php
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 | |
add_theme_support( 'post-thumbnails' ); | |
set_post_thumbnail_size( 150, 150, true); | |
add_action('init', 'company_register'); | |
function company_register() { | |
$labels = array( | |
'name' => _x('Companies', 'post type general name'), | |
'singular_name' => _x('Company', 'post type singular name'), | |
'add_new' => _x('Add New', 'Company'), | |
'add_new_item' => __('Add New Company'), | |
'edit_item' => __('Edit Company'), | |
'new_item' => __('New Company'), | |
'view_item' => __('View Company'), | |
'search_items' => __('Search Companies'), | |
'not_found' => __('No Companies found'), | |
'not_found_in_trash' => __('No Companies found in Trash'), | |
'parent_item_colon' => '' | |
); | |
$args = array( | |
'label' => __('Companies'), | |
'singular_label' => __('Company'), | |
'public' => true, | |
'show_ui' => true, | |
'capability_type' => 'page', | |
'hierarchical' => false, | |
'rewrite' => true, | |
'supports' => array('title', 'editor', 'thumbnail', 'custom-fields'), | |
'taxonomies' => array('category', 'cities') | |
); | |
register_post_type( 'company' , $args ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment