Cre-snippet-podcast
Recomendación de Joan Boluda
if ( ! function_exists('ortega_crear_ctp_poadcast') ) { // Register Custom Post Type function ortega_crear_ctp_poadcast() { $labels = array( 'name' => _x( 'Podcast', 'Post Type General Name', 'ortega_crear_ftp_poadcast' ), 'singular_name' => _x( 'Podcast', 'Post Type Singular Name', 'ortega_crear_ftp_poadcast' ), 'menu_name' => __( 'Podcast', 'ortega_crear_ftp_poadcast' ), 'name_admin_bar' => __( 'Podcast', 'ortega_crear_ftp_poadcast' ), 'archives' => __( 'Archivos de Podcast', 'ortega_crear_ftp_poadcast' ), 'attributes' => __( 'Podcast Attributes', 'ortega_crear_ftp_poadcast' ), 'parent_item_colon' => __( 'Parent Podcast:', 'ortega_crear_ftp_poadcast' ), 'all_items' => __( 'Todos los Podcast', 'ortega_crear_ftp_poadcast' ), 'add_new_item' => __( 'Añadir nuevo Podcast', 'ortega_crear_ftp_poadcast' ), 'add_new' => __( 'Añadir nuevo', 'ortega_crear_ftp_poadcast' ), 'new_item' => __( 'Nuevo Podcast', 'ortega_crear_ftp_poadcast' ), 'edit_item' => __( 'Editar Podcast', 'ortega_crear_ftp_poadcast' ), 'update_item' => __( 'Update Podcast', 'ortega_crear_ftp_poadcast' ), 'view_item' => __( 'Ver Podcast', 'ortega_crear_ftp_poadcast' ), 'view_items' => __( 'Ver Podcast', 'ortega_crear_ftp_poadcast' ), 'search_items' => __( 'Buscar Podcast', 'ortega_crear_ftp_poadcast' ), 'not_found' => __( 'Not found', 'ortega_crear_ftp_poadcast' ), 'not_found_in_trash' => __( 'Not found in Trash', 'ortega_crear_ftp_poadcast' ), 'featured_image' => __( 'Featured Image', 'ortega_crear_ftp_poadcast' ), 'set_featured_image' => __( 'Set featured image', 'ortega_crear_ftp_poadcast' ), 'remove_featured_image' => __( 'Remove featured image', 'ortega_crear_ftp_poadcast' ), 'use_featured_image' => __( 'Use as featured image', 'ortega_crear_ftp_poadcast' ), 'insert_into_item' => __( 'Insert into servicio', 'ortega_crear_ftp_poadcast' ), 'uploaded_to_this_item' => __( 'Uploaded to this servicio', 'ortega_crear_ftp_poadcast' ), 'items_list' => __( 'Lista de servicios', 'ortega_crear_ftp_poadcast' ), 'items_list_navigation' => __( 'Service list navigation', 'ortega_crear_ftp_poadcast' ), 'filter_items_list' => __( 'Filter Service list', 'ortega_crear_ftp_poadcast' ), ); $rewrite = array( 'slug' => 'podcast', 'with_front' => true, 'pages' => true, 'feeds' => true, ); $args = array( 'label' => __( 'Podcast', 'ortega_crear_ftp_poadcast' ), 'description' => __( 'ctp de podcast', 'ortega_crear_ftp_poadcast' ), 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail', 'revisions', 'custom-fields', 'page-attributes', 'post-formats' ), 'taxonomies' => array( 'category', 'post_' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => 5, 'menu_icon' => 'dashicons-playlist-audio', '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' => 'page', ); register_post_type( 'ortega_podcast', $args ); } add_action( 'init', 'ortega_crear_ctp_poadcast', 0 ); }