if ( ! function_exists('wuait_custom_post_type') ) { // Register Custom Post Type function wuait_custom_post_type() { $labels = array( 'name' => _x( 'Portfolio', 'Post Type General Name', 'text_domain' ), 'singular_name' => _x( 'Portfolio', 'Post Type Singular Name', 'text_domain' ), 'menu_name' => __( 'Post portfolio', 'text_domain' ), 'name_admin_bar' => __( 'Post Portfolio', 'text_domain' ), 'archives' => __( 'Portfolio Archivos', 'text_domain' ), 'attributes' => __( 'Portfolio Atributos', 'text_domain' ), 'parent_item_colon' => __( 'Parent Portfolio', 'text_domain' ), 'all_items' => __( 'All Portfolio', 'text_domain' ), 'add_new_item' => __( 'Add New Portfolio', 'text_domain' ), 'add_new' => __( 'Add Portfolio', 'text_domain' ), 'new_item' => __( 'New Portfolio', 'text_domain' ), 'edit_item' => __( 'Edit Portfolio', 'text_domain' ), 'update_item' => __( 'Update Portfolio', 'text_domain' ), 'view_item' => __( 'View Portfolio', 'text_domain' ), 'view_items' => __( 'View Portfolio', 'text_domain' ), 'search_items' => __( 'Search Portfolio', 'text_domain' ), 'not_found' => __( 'No encontrado', 'text_domain' ), 'not_found_in_trash' => __( 'No encontrado en la papelera', 'text_domain' ), 'featured_image' => __( 'Imagen destacada', 'text_domain' ), 'set_featured_image' => __( 'Configurar imagen destacada', 'text_domain' ), 'remove_featured_image' => __( 'Borrar imagen destacada', 'text_domain' ), 'use_featured_image' => __( 'Usar como imagen destacada', 'text_domain' ), 'insert_into_item' => __( 'Insertar en el portfolio', 'text_domain' ), 'uploaded_to_this_item' => __( 'Subido a este Portfolio', 'text_domain' ), 'items_list' => __( 'Lista de portfolio', 'text_domain' ), 'items_list_navigation' => __( 'Portfolio lista de navegación', 'text_domain' ), 'filter_items_list' => __( 'Filter Portfolio list', 'text_domain' ), ); $rewrite = array( 'slug' => 'portfolio_ese_wuait', 'with_front' => true, 'pages' => true, 'feeds' => true, ); $args = array( 'label' => __( 'Portfolio', 'text_domain' ), 'description' => __( 'Descripción del portfolio', 'text_domain' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail', 'comments', 'custom-fields', 'page-attributes', 'post-formats' ), 'taxonomies' => array( 'category', 'post_tag' ), 'hierarchical' => true, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-admin-customizer', 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => '', 'exclude_from_search' => true, 'publicly_queryable' => true, 'rewrite' => $rewrite, 'capability_type' => 'page', ); register_post_type( 'cpt_portfolio', $args ); } add_action( 'init', 'wuait_custom_post_type', 0 ); }