Skip to content

Instantly share code, notes, and snippets.

@codigoconjuan
Created March 17, 2017 01:25
Show Gist options
  • Save codigoconjuan/9d10f2e4a23b6ba1cff6dbf3748990e8 to your computer and use it in GitHub Desktop.
Save codigoconjuan/9d10f2e4a23b6ba1cff6dbf3748990e8 to your computer and use it in GitHub Desktop.
Post Type Especialidades para La Pizzeria
add_action( 'init', 'lapizzeria_especialidades' );
function lapizzeria_especialidades() {
$labels = array(
'name' => _x( 'Pizzas', 'lapizzeria' ),
'singular_name' => _x( 'Pizzas', 'post type singular name', 'lapizzeria' ),
'menu_name' => _x( 'Pizzas', 'admin menu', 'lapizzeria' ),
'name_admin_bar' => _x( 'Pizzas', 'add new on admin bar', 'lapizzeria' ),
'add_new' => _x( 'Add New', 'book', 'lapizzeria' ),
'add_new_item' => __( 'Add New Pizza', 'lapizzeria' ),
'new_item' => __( 'New Pizzas', 'lapizzeria' ),
'edit_item' => __( 'Edit Pizzas', 'lapizzeria' ),
'view_item' => __( 'View Pizzas', 'lapizzeria' ),
'all_items' => __( 'All Pizzas', 'lapizzeria' ),
'search_items' => __( 'Search Pizzas', 'lapizzeria' ),
'parent_item_colon' => __( 'Parent Pizzas:', 'lapizzeria' ),
'not_found' => __( 'No Pizzases found.', 'lapizzeria' ),
'not_found_in_trash' => __( 'No Pizzases found in Trash.', 'lapizzeria' )
);
$args = array(
'labels' => $labels,
'description' => __( 'Description.', 'lapizzeria' ),
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => array( 'slug' => 'especialidades' ),
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => false,
'menu_position' => 6,
'supports' => array( 'title', 'editor', 'thumbnail' ),
'taxonomies' => array( 'category' ),
);
register_post_type( 'especialidades', $args );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment