Post Type Generator Gallery
Post Type Generator Gallery example
if ( ! function_exists('Gallery') ) { // Register Custom Post Type function Gallery() { $labels = array( 'name' => _x( 'Galleries', 'Post Type General Name', 'text_domain' ), 'singular_name' => _x( 'Gallery', 'Post Type Singular Name', 'text_domain' ), 'menu_name' => __( 'Galleries', 'text_domain' ), 'name_admin_bar' => __( 'Gallery', 'text_domain' ), 'parent_item_colon' => __( 'Parent Gallery:', 'text_domain' ), 'all_items' => __( 'All Items', 'text_domain' ), 'add_new_item' => __( 'Add New Gallery', 'text_domain' ), 'add_new' => __( 'Add New Gallery', 'text_domain' ), 'new_item' => __( 'New Gallery', 'text_domain' ), 'edit_item' => __( 'Edit Gallery', 'text_domain' ), 'update_item' => __( 'Update Gallery', 'text_domain' ), 'view_item' => __( 'View Gallery', 'text_domain' ), 'search_items' => __( 'Search Gallery', 'text_domain' ), 'not_found' => __( 'No galleries found', 'text_domain' ), 'not_found_in_trash' => __( 'No galleries found in Trash', 'text_domain' ), ); $args = array( 'label' => __( '', 'text_domain' ), 'labels' => $labels, 'supports' => array( 'title', 'revisions', ), 'hierarchical' => false, 'public' => true, 'show_ui' => false, 'show_in_menu' => false, 'menu_position' => 5, 'menu_icon' => 'dashicons-format-gallery', 'show_in_admin_bar' => false, 'show_in_nav_menus' => false, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => true, 'publicly_queryable' => true, 'rewrite' => false, 'capability_type' => 'post', ); register_post_type( '', $args ); } // Hook into the 'init' action add_action( 'init', 'Gallery', 0 ); }