Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ( function_exists('register_sidebar') ) {
- register_sidebar(array(
- 'name' => 'Sidebar',
- 'description' => 'Sidebar for the left side of the page.',
- 'before_widget' => '<li id="%1$s" class="widget %2$s">',
- 'after_widget' => '</li>',
- 'before_title' => '<h2 class="widgettitle">',
- 'after_title' => '</h2>',
- ));
- }
- add_action('init', 'class_type_register');
- add_action('init', 'build_taxonomies');
- function build_taxonomies() {
- register_taxonomy(
- 'classes',
- 'class_post',
- array(
- 'hierarchical' => true,
- 'label' => 'Classes',
- 'singular_name' => 'Class',
- 'query_var' => true,
- 'rewrite' => true
- )
- );
- }
- function class_type_register() {
- $labels = array(
- 'name' => _x('Class Posts', 'post type general name'),
- 'singular_name' => _x('Class Post', 'post type singular name'),
- 'add_new' => _x('Add New', 'class post'),
- 'add_new_item' => __('Add New Class Post'),
- 'edit_item' => __('Edit Class Post'),
- 'new_item' => __('New Class Post'),
- 'view_item' => __('View Class Post'),
- 'search_items' => __('Search Class Post'),
- 'not_found' => __('Nothing found'),
- 'not_found_in_trash' => __('Nothing found in Trash'),
- 'parent_item_colon' => ''
- );
- $args = array(
- 'labels' => $labels,
- 'public' => true,
- 'publicly_queryable' => true,
- 'show_ui' => true,
- 'query_var' => true,
- 'rewrite' => false,
- 'capability_type' => 'post',
- 'hierarchical' => false,
- 'menu_position' => null,
- 'supports' => array('title', 'editor', 'thumbnail', 'attachment')
- );
- register_post_type( 'class_post' , $args );
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement