Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function create_posttype() {
- // Twenty Twenty Slider
- register_post_type( 'twenty_slider',
- array(
- 'labels' => array(
- 'name' => __( 'Twenty Sliders', 'post type general name', 'your-plugin-textdomain' ),
- 'singular_name' => __( 'Twenty Slider', 'post type singular name', 'your-plugin-textdomain' ),
- 'menu_name' => __( 'Twenty Sliders', 'admin menu', 'your-plugin-textdomain' ),
- 'name_admin_bar' => __( 'Twenty Slider', 'add new on admin bar', 'your-plugin-textdomain' ),
- 'add_new' => __( 'Add New', 'Twenty Slider', 'your-plugin-textdomain' ),
- 'add_new_item' => __( 'Add New Twenty Slider', 'your-plugin-textdomain' ),
- 'new_item' => __( 'New Twenty Slider', 'your-plugin-textdomain' ),
- 'edit_item' => __( 'Edit Twenty Slider', 'your-plugin-textdomain' ),
- 'view_item' => __( 'View Twenty Slider', 'your-plugin-textdomain' ),
- 'all_items' => __( 'All Twenty Sliders', 'your-plugin-textdomain' ),
- 'search_items' => __( 'Search Twenty Sliders', 'your-plugin-textdomain' ),
- 'parent_item_colon' => __( 'Parent Twenty Sliders:', 'your-plugin-textdomain' ),
- 'not_found' => __( 'No Twenty Sliders found.', 'your-plugin-textdomain' ),
- 'not_found_in_trash' => __( 'No Twenty Sliders found in Trash.', 'your-plugin-textdomain' )
- ),
- 'public'=> true,
- 'menu_icon'=> 'dashicons-format-gallery ', /* For Dashicons Menu */
- 'publicly_queryable' => true,
- 'show_ui' => true,
- 'show_in_menu' => true,
- 'query_var' => true,
- 'rewrite' => array( 'slug' => 'Twenty Slider' ),
- 'capability_type' => 'post',
- 'has_archive' => true,
- 'hierarchical' => false,
- 'menu_position' => null,
- 'supports' => array('title')
- // all supports options 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments','trackbacks','custom-fields','revisions','page-attributes','post-formats'
- )
- );
- // add another custom post
- }
- add_action( 'init', 'create_posttype' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement