Skip to content

Instantly share code, notes, and snippets.

@luisfelipe-dev
Created November 24, 2017 01:22
Show Gist options
  • Select an option

  • Save luisfelipe-dev/88ddb5f4c0f23ffa3b4855e9ff0c8e7e to your computer and use it in GitHub Desktop.

Select an option

Save luisfelipe-dev/88ddb5f4c0f23ffa3b4855e9ff0c8e7e to your computer and use it in GitHub Desktop.
//CUSTOM POST TYPE
function custom_post_type_modalidades() {
register_post_type('modalidades', array(
'label' => 'Modalidades',
'description' => 'Modalidades',
'public' => true,
'menu_icon' => 'dashicons-shield-alt',
'show_ui' => true,
'show_in_menu' => true,
'capability_type' => 'page',
'map_meta_cap' => true,
'hierarchical' => false,
'rewrite' => array('slug' => 'modalidades', 'with_front' => true),
'query_var' => true,
'supports' => array('title', 'editor', 'page-attributes','post-formats'),
'menu_position' => 5,
'labels' => array (
'name' => 'Modalidades',
'singular_name' => 'Modalidades',
'menu_name' => 'Modalidades',
'add_new' => 'Adicionar Novo',
'add_new_item' => 'Adicionar Nova Modalidade',
'edit' => 'Editar',
'edit_item' => 'Editar Modalidade',
'new_item' => 'Novo Modalidade',
'view' => 'Ver Modalidade',
'view_item' => 'Ver Modalidade',
'search_items' => 'Procurar Modalidade Realizado',
'not_found' => 'Nenhum Modalidade Encontrado',
'not_found_in_trash' => 'Nenhum Modalidade Encontrado no Lixo',
)
));
}
add_action('init', 'custom_post_type_modalidades');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment