Get 404 error
-
I get a 404 error for both term pages and posts. I am working on a local server, here is my CPT and taxonomy
register_taxonomy('city', array('school'), array( 'label' => 'City', 'labels' => array( 'name' => 'City', 'singular_name' => 'City', 'search_items' => 'Find City', ), 'public' => true, 'show_in_nav_menus' => false, 'show_ui' => true, 'show_tagcloud' => false, 'hierarchical' => true, 'rewrite' => array('slug'=>'city', 'hierarchical'=>true,), 'show_admin_column' => true, ) );
register_post_type('school', array( 'label' => 'School', 'description' => '', 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_rest' => false, 'rest_base' => '', 'show_in_menu' => true, 'exclude_from_search' => false, 'capability_type' => 'post', 'map_meta_cap' => true, 'hierarchical' => false, 'rewrite' => array( 'slug'=>'school', ), 'has_archive' => 'school', 'query_var' => true, 'supports' => array( 'title', 'editor', 'thumbnail' ), 'taxonomies' => array( 'city' ), ) );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Get 404 error’ is closed to new replies.