Skip to content

Instantly share code, notes, and snippets.

@madeinnordeste
Last active February 22, 2017 19:33
Show Gist options
  • Save madeinnordeste/6ed12cd7c4b4a39c3757 to your computer and use it in GitHub Desktop.
Save madeinnordeste/6ed12cd7c4b4a39c3757 to your computer and use it in GitHub Desktop.
Wordpress - Custom post type
<?php
//in theme functions.php
// @see http://codex.wordpress.org/Function_Reference/register_post_type
$labels = array(
'name' => _x('Edição Digital', 'Edição Digital'),
'singular_name' => _x('edicao_digital', 'Edição Digital'),
'add_new' => _x('Nova Edição Digital', 'edicao_digital'),
'add_new_item' => __('Adicionar nova Edição Digital'),
'edit_item' => __('Editar Edição Digital'),
'new_item' => __('Nova Edição Digital'),
'view_item' => __('Ver Edição Digital'),
'search_items' => __('Pesquisar Edição Digital'),
'not_found' => __('Nenhuma Edição Digital Encontrada'),
'not_found_in_trash' => __('Nenhuma Edição Digital na lixeira'),
'parent_item_colon' => ''
);
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'query_var' => true,
'rewrite' => true,
'capability_type' => 'post',
'hierarchical' => true,
'menu_position' => null,
'supports' => array('title','editor','author','thumbnail','excerpt','comments', 'page-attributes')
);
register_post_type('edicao_digital',$args);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment