404 page for category
-
Hello guys, could you please help me with this issue?
My category page isn’t working.
I creat this port type and taxonomy `
/* — Post Type – portfolio — */ function custom_post_type_portfolio() { $labels = [ “name” => __( “Portfolio”), “singular_name” => __( “Portfolio”), ]; $args = [ “label” => __( “Portfolio”), “labels” => $labels, “description” => “”, “public” => true, “publicly_queryable” => true, “show_ui” => true, “delete_with_user” => false, “show_in_rest” => true, “rest_base” => “”, “rest_controller_class” => “WP_REST_Posts_Controller”, “has_archive” => true, “show_in_menu” => true, “show_in_nav_menus” => true, “delete_with_user” => false, “exclude_from_search” => false, “capability_type” => “post”, “map_meta_cap” => true, “hierarchical” => false, “rewrite” => [ “slug” => “portfolio”, “with_front” => false, ‘hierarchical’ => true ], “query_var” => true, “menu_position” => 3, “menu_icon” => “dashicons-book-alt”, “supports” => [ “title”, “editor”, “thumbnail”, “excerpt”, “trackbacks”, “custom-fields”, “comments”, “revisions”, “author”, “page-attributes”, “post-formats” ], ]; register_post_type( “portfolio”, $args ); } add_action( ‘init’, ‘custom_post_type_portfolio’ ); /* —————————— Taxonomias – Genero —————————–*/ function custom_taxonomy_portfoliocategories() { /** * Taxonomy: portfolio. */ $labels = [ “name” => __( “Portfolio Categories”), “singular_name” => __( “portfoliocategories”), ]; $args = [ “label” => __( “portfolio categories”), “labels” => $labels, “public” => true, “publicly_queryable” => true, “hierarchical” => true, “show_ui” => true, “show_in_menu” => true, “show_in_nav_menus” => true, “query_var” => true, “rewrite” => [ “slug” => “portfolio”, “with_front” => true, ‘hierarchical’ => true ], “show_admin_column” => true, “show_in_rest” => true, “rest_base” => “portfoliocategories”, “rest_controller_class” => “WP_REST_Terms_Controller”, “show_in_quick_edit” => true, ]; register_taxonomy( “portfoliocategories”, [ “portfolio” ], $args ); } add_action( ‘init’, ‘custom_taxonomy_portfoliocategories’ );
I saved my permalinks with post-name, category base = category, tag = tag
My files are: “archive.php” for all catgories and “category” for a specific category, but category isn’t working.
Anybody have an idea?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘404 page for category’ is closed to new replies.