Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $labels = array( 'name' => 'Knowledge Base Articles',
- 'singular_name' => 'Article',
- 'menu_name' => 'Knowledge Base',
- 'add_new_item' => 'Add an Article', );
- $args = array( 'label' => 'Knowledge Base Articles',
- 'labels' => $labels,
- 'supports' => array( 'title', 'editor', 'page-attributes', ),
- 'taxonomies' => array( 'kb_categories', 'kb_tags' ),
- 'hierarchical' => true,
- 'public' => true,
- 'show_ui' => true,
- 'show_in_menu' => true,
- 'menu_position' => 21,
- 'menu_icon' => 'dashicons-screenoptions',
- 'show_in_admin_bar' => false,
- 'show_in_nav_menus' => true,
- 'can_export' => true,
- 'has_archive' => true,
- 'exclude_from_search' => ( ! $_kbopt_search ),
- 'publicly_queryable' => true,
- 'query_var' => 'gyo_kb',
- 'show_in_rest' => true,
- 'rewrite' => array( 'slug' => $_kbopt_rewrite ),
- );
- register_post_type( 'gyo_kb', $args );
- flush_rewrite_rules( );
Advertisement
Add Comment
Please, Sign In to add comment