Skip to content

Instantly share code, notes, and snippets.

@Ravenna
Created October 21, 2011 16:01
Show Gist options
  • Save Ravenna/1304208 to your computer and use it in GitHub Desktop.
Save Ravenna/1304208 to your computer and use it in GitHub Desktop.
functions.php
<?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