register_taxonomy and register_post_type does not work

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() {
    register_post_type('produto',
    array(
        '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)
    );
}

Related posts

Leave a Reply

1 comment

  1. 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