post type trailers
trailers
if ( ! function_exists('custom_post_type_trailer') ) { // Register Custom Post Type function custom_post_type_trailer() { $labels = array( 'name' => _x( 'Trailers', 'Post Type General Name', 'text_domain' ), 'singular_name' => _x( 'Trailer', 'Post Type Singular Name', 'text_domain' ), 'menu_name' => __( 'Trailers', 'text_domain' ), 'name_admin_bar' => __( 'Trailers', 'text_domain' ), 'parent_item_colon' => __( 'Trailer padre:', 'text_domain' ), 'all_items' => __( 'Todos los trailers', 'text_domain' ), 'add_new_item' => __( 'Añadir nuevo trailer', 'text_domain' ), 'add_new' => __( 'Añadir nuevo', 'text_domain' ), 'new_item' => __( 'Nuevo trailer', 'text_domain' ), 'edit_item' => __( 'Editar Trailer', 'text_domain' ), 'update_item' => __( 'Actualizar Trailer', 'text_domain' ), 'view_item' => __( 'Ver Trailer', 'text_domain' ), 'search_items' => __( 'Buscar Trailer', 'text_domain' ), 'not_found' => __( 'No Encontrado', 'text_domain' ), 'not_found_in_trash' => __( 'No encontrado en la papelera', 'text_domain' ), ); $rewrite = array( 'slug' => 'trailers', 'with_front' => true, 'pages' => true, 'feeds' => true, ); $args = array( 'label' => __( 'trailers', 'text_domain' ), 'description' => __( 'Trailers', 'text_domain' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'trackbacks', 'revisions', 'custom-fields', 'page-attributes', 'post-formats', ), 'taxonomies' => array( 'category', 'post_tag' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-video-alt3', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'rewrite' => $rewrite, 'capability_type' => 'post', ); register_post_type( 'trailers', $args ); } // Hook into the 'init' action add_action( 'init', 'custom_post_type_trailer', 0 ); }