Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // register post_type results
- function custom_post_type_init() {
- $labels = array(
- 'name' => __( 'Results' ),
- 'singular_name' => __( 'Results' ),
- 'add_new' => __( 'Add new result' ),
- 'add_new_item' => __( 'Add new result' ),
- 'edit_item' => __( 'Edit result' ),
- 'new_item' => __( 'New result' ),
- 'all_items' => __( 'All results' ),
- 'view_item' => __( 'View result' ),
- 'search_items' => __( 'Search results' ),
- 'not_found' => __( 'No results' ),
- 'not_found_in_trash' => __( 'No results in trash' ),
- 'menu_name' => __( 'Results' )
- );
- $cptresult = array(
- 'labels' => $labels,
- 'public' => true,
- 'exclude_from_search' => false,
- 'public_queryable' => true,
- 'show_ui' => true,
- 'show_in_menu' => true,
- 'query_var' => 'results',
- 'rewrite' => array( 'slug' => 'results', 'feeds' => true ),
- 'has_archive' => true,
- 'menu_position' => 30,
- 'menu_icon' => get_stylesheet_directory_uri() . '/assets/images/icon-trophy.png',
- 'supports' => array('title', 'editor', 'author', 'thumbnail', 'custom-fields')
- );
- register_post_type( 'results', $cptresult );
- }
- add_action( 'init', 'custom_post_type_init' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement