[CPT] agrega un custom post al menu de administracion - esto es util para complementar con el plugin ACF #cpt #acf #wordpress #php
<?php
/* =============================================================================
POST TYPE
http://justintadlock.com/archives/2013/09/13/register-post-type-cheat-sheet
========================================================================== */
$labels = array(
'name' => 'Campaigns',
'singular_name' => 'Campaign',
'menu_name' => 'Campaigns',
'parent_item_colon' => 'Parent campaign:',
'all_items' => 'All campaigns',
'view_item' => 'View campaign',
'add_new_item' => 'Add new campaign',
'add_new' => 'Add campaign',
'edit_item' => 'Edit campaign',
'update_item' => 'Update campaign',
'search_items' => 'Search campaign',
'not_found' => 'Not found',
'not_found_in_trash' => 'Not found in Trash'
);
$args = array(
'label' => 'Campaign',
'description' => 'Campaign',
'labels' => $labels,
'supports' => array( ),
'taxonomies' => array( ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 5,
'menu_icon' => 'dashicons-images-alt',
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'capability_type' => 'post',
'rewrite' => array( 'slug' => 'campaign' )
);
register_post_type( 'campaign', $args );