Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function create_post_type_html5()
- {
- register_taxonomy_for_object_type('category', 'loja'); // Register Taxonomies for Category
- register_taxonomy_for_object_type('post_tag', 'loja');
- register_post_type('loja', // Register Custom Post Type
- array(
- 'labels' => array(
- 'name' => __('Loja', 'loja'), // Rename these to suit
- 'singular_name' => __('Produtos', 'loja'),
- 'add_new' => __('Adicionar Novo Produto', 'loja'),
- 'add_new_item' => __('Adicionar Novo Produto', 'loja'),
- 'edit' => __('Editar', 'loja'),
- 'edit_item' => __('Editar Produto', 'loja'),
- 'new_item' => __('Novo Produto', 'loja'),
- 'view' => __('Ver Produto', 'loja'),
- 'view_item' => __('Ver Produto', 'loja'),
- 'search_items' => __('Pesquisar Produto', 'loja'),
- 'not_found' => __('Produto não encontrado', 'loja'),
- 'not_found_in_trash' => __('No produto found in Trash', 'loja')
- ),
- 'public' => true,
- 'hierarchical' => true, // Allows your posts to behave like Hierarchy Pages
- 'has_archive' => true,
- 'supports' => array(
- 'title',
- 'editor',
- 'excerpt',
- 'thumbnail'
- ), // Go to Dashboard Custom HTML5 Blank post for supports
- 'can_export' => true, // Allows export in Tools > Export
- 'taxonomies' => array(
- 'post_tag',
- 'category'
- ) // Add Category and Post Tags support
- ));
- }
Advertisement
Add Comment
Please, Sign In to add comment