<?php
/*-------------------------------------------------------------------------------
Centros
-------------------------------------------------------------------------------*/

// Create custom post type
function create_empresas() {
    register_post_type( 'centros',
      array(
        'labels' => array(
          'name' => __( 'Centros' ),
          'all_items' => __('Todos los centros'),
          'singular_name' => __( 'Centro' ),
          'add_new' => __('Añadir centro'),

        ),
        'supports' => array('page-attributes', 'title', 'thumbnail', 'excerpt', 'comments', 'revisions', 'menu_order'),
        'public' => true,
        'menu_position' => 4,
        'menu_order' => true,
        'has_archive' => true,
        'hierarchical' => false,
        'rewrite' => array(
          'slug' => 'centros'
        )
      )
    );
}

add_action( 'init', 'create_empresas' );