Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Articulos CPT

Articulos invesmarketing

if ( ! function_exists('cpt_blog_inves') ) {

// Register Custom Post Type
function cpt_blog_inves() {

	$labels = array(
		'name'                  => _x( 'Articulos', 'Post Type General Name', 'cpt_blog_inves' ),
		'singular_name'         => _x( 'Articulo', 'Post Type Singular Name', 'cpt_blog_inves' ),
		'menu_name'             => __( 'Articulos', 'cpt_blog_inves' ),
		'name_admin_bar'        => __( 'Articulos', 'cpt_blog_inves' ),
		'archives'              => __( 'Archivo de Articulos', 'cpt_blog_inves' ),
		'parent_item_colon'     => __( 'Parent Item:', 'cpt_blog_inves' ),
		'all_items'             => __( 'Todos los articulos', 'cpt_blog_inves' ),
		'add_new_item'          => __( 'Añadir nuevo Articulo', 'cpt_blog_inves' ),
		'add_new'               => __( 'Añadir nuevo', 'cpt_blog_inves' ),
		'new_item'              => __( 'Nuevo Articulo', 'cpt_blog_inves' ),
		'edit_item'             => __( 'Editar Articulo', 'cpt_blog_inves' ),
		'update_item'           => __( 'Actualizar Articulo', 'cpt_blog_inves' ),
		'view_item'             => __( 'Ver Articulo', 'cpt_blog_inves' ),
		'search_items'          => __( 'Buscar Articulo', 'cpt_blog_inves' ),
		'not_found'             => __( 'Articulo no encontrado', 'cpt_blog_inves' ),
		'not_found_in_trash'    => __( 'Articulo no encontrado en papelera', 'cpt_blog_inves' ),
		'featured_image'        => __( 'Imagen destacada', 'cpt_blog_inves' ),
		'set_featured_image'    => __( 'Set featured image', 'cpt_blog_inves' ),
		'remove_featured_image' => __( 'Remove featured image', 'cpt_blog_inves' ),
		'use_featured_image'    => __( 'Use as featured image', 'cpt_blog_inves' ),
		'insert_into_item'      => __( 'Insert into item', 'cpt_blog_inves' ),
		'uploaded_to_this_item' => __( 'Uploaded to this item', 'cpt_blog_inves' ),
		'items_list'            => __( 'Items list', 'cpt_blog_inves' ),
		'items_list_navigation' => __( 'Items list navigation', 'cpt_blog_inves' ),
		'filter_items_list'     => __( 'Filter items list', 'cpt_blog_inves' ),
	);
	$args = array(
		'label'                 => __( 'Articulo', 'cpt_blog_inves' ),
		'description'           => __( 'Articulos del Blog de InvesMarketing', 'cpt_blog_inves' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'revisions', 'page-attributes', 'post-formats', ),
		'taxonomies'            => array( 'post_tag' ),
		'hierarchical'          => true,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-welcome-learn-more',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => true,		
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'capability_type'       => 'page',
	);
	register_post_type( 'invesblog_ptk', $args );

}
add_action( 'init', 'cpt_blog_inves', 0 );

}