0
The correct thing would be to have the same behavior as "Category"
of post type "post"
wordpress, but it does not happen.
For example when I access http://localhost/projeto/anunciantes/
I have how to make my queries normally to customize my exhibitions, but when I access http://localhost/projeto/anunciantes/categoria/sub-categoria/enfim...
he shows me error 404, even though I left 'hierarchical' => true,
I can’t understand what’s happening
register_taxonomy( 'anunciante_category', array( 'anunciante' ), array(
'hierarchical' => true,
'label' => __( 'Categoria Anunciantes' ),
'labels' => array( // Labels customizadas
'name' => _x( 'Categorias', 'Categorias' ),
'singular_name' => _x( 'Categoria', 'Categoria' ),
'search_items' => __( 'Pesquisar Categorias' ),
'all_items' => __( 'Todas Categorias' ),
'parent_item' => __( 'Categoria Pai' ),
'parent_item_colon' => __( 'Categoria Pai:' ),
'edit_item' => __( 'Editar Categoria' ),
'update_item' => __( 'Atualizar Categoria' ),
'add_new_item' => __( 'Adicionar Nova Categoria' ),
'new_item_name' => __( 'Nome Nova Categoria' ),
'menu_name' => __( 'Categorias' ),
),
'show_ui' => true,
'show_in_tag_cloud' => true,
'query_var' => true,
'rewrite' => array(
'slug' => 'anunciantes',//anunciantes/categorias
'with_front' => true,
),
)
);
this is exactly how is my current function for custom post type http://pastebin.com/kKgPTyQJ I am analyzing what you answered me
– Pablo Campina
tries to leave different CPT and taxonomy nomenclature, generates less work debugging problems.
– Otto
but CPT is advertiser and TAXONOMY is advertiser_category
– Pablo Campina
'hierarchical' => true, needs to be false because true equals page and false equals post
– Otto
I tested with the false, but from what I’ve seen need to leave true for him to follow the categories daughters
– Pablo Campina
and another if I leave as 'hierarchical' => false is everything as parent category, and that’s not what I intend
– Pablo Campina
by what I read false is like post where it works straight and true as pages
– Otto
the point is that none of the ways works as it has to, but when the value is set true it turns everything into parent category, and that is not valid
– Pablo Campina
If it is more practical https://wordpress.org/plugins/custom-post-type-ui/
– Otto
I am avoiding the unnecessary use of plugins, but if I can’t make it work otherwise, I check the possibility of using it
– Pablo Campina
http://pastebin.com/MKicRBPh
– Otto
This is a test
– Otto
I haven’t found a solution yet ... it works inappropriately
– Pablo Campina
which would be inappropriate ?
– Otto
my advertising taxonomy_category does not work like the categories of
posts
for example– Pablo Campina
very strange that there yesterday I needed and I ended up creating the same way I passed you and this working normally
– Otto
Have you seen my complete Pastebin ? http://pastebin.com/kKgPTyQJ code :/
– Pablo Campina
Both are equal and can generate the whole error
– Otto