WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a problem using the register_post_type and register_taxonomy on my Wordpress. I created the code on my functions.php and it does not update my panel. Why?

//Categorias personalizadas
register_taxonomy('produtos', 'produto', array('hierarchical' => true, 'label' => 'Categorias de Produtos', 'query_var' => true, 'rewrite' => true));
//Posts personalizados
add_action('init', 'create_post_type');
function create_post_type() {
        'labels' => array(
        'name' => __('Produto'),
        'singular_name' => __('Produto')),
        'public' => true,
        'rewrite' => true,
        'supports' => array('title','editor','author','thumbnail','excerpt','comments','custom-fields','image'),
        'has_archive' => true)
share|improve this question

closed as off-topic by kaiser Dec 21 '14 at 14:05

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

You sure you added it to the correct functions.php? – Hameedullah Khan May 16 '11 at 3:16
a copy/paste of your code works for me, your error is elsewhere. – Milo May 16 '11 at 3:18
did you add it to the functions.php of the active theme? – supajb May 16 '11 at 4:31
up vote 3 down vote accepted

I copy pasted your code into my functions.php and it worked for me, make sure you are using a recent version of WordPress that supports Custom Post Types

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.