Tagged: taxonomy
-
AuthorPosts
-
November 16, 2016 at 2:30 am #712690
Hi
I registered a custom taxonomy which worked well in my previous theme.
After changing the theme to Enfold, custom taxonomy archive page results in 404 error.I declared the taxonomy as follows in the functions.php file:
function add_custom_taxonomies() { // Add new "Area" taxonomy to Posts register_taxonomy('speciality', 'post', array( // Hierarchical taxonomy (like categories) 'hierarchical' => true, // This array of options controls the labels displayed in the WordPress Admin UI 'labels' => array( 'name' => _x( 'Specialities', 'taxonomy general name' ), 'singular_name' => _x( 'Speciality', 'taxonomy singular name' ), 'search_items' => __( 'Search Specialities' ), 'all_items' => __( 'All Specialities' ), 'parent_item' => __( 'Parent Speciality' ), 'parent_item_colon' => __( 'Parent Speciality:' ), 'edit_item' => __( 'Edit Speciality' ), 'update_item' => __( 'Update Speciality' ), 'add_new_item' => __( 'Add New Speciality' ), 'new_item_name' => __( 'New Speciality Name' ), 'menu_name' => __( 'Specialities' ), ), // Control the slugs used for this taxonomy 'rewrite' => array( 'slug' => 'specificarea', // This controls the base slug that will display before each term 'with_front' => false, // Don't display the category base before "/locations/" 'hierarchical' => true // This will allow URL's like "/locations/boston/cambridge/" ), )); } add_action( 'init', 'add_custom_taxonomies', 0 );
Is there a way to correct this issue?
(One more question: Using custom taxonomy will affect the loading speed of the site? If then, I will just remove them.)- This topic was modified 7 years, 10 months ago by elohimguy. Reason: Add one more question
November 16, 2016 at 7:17 am #712781Hey elohimguy,
Did you try resetting your Permalink settings under Settings->Permalinks?
Best regards,
RikardNovember 16, 2016 at 7:21 am #712783Hi Rikard
Really thanks for your help.
I reset the Permalink settings and now it’s working.November 16, 2016 at 9:30 am #712807Hi,
Great, glad you got it working :-)
Please let us know if you should need any further help on the topic.
Best regards,
RikardJanuary 27, 2017 at 1:31 pm #739354does one have to CHANGE or RESET the permalink settings?
how does one RESET the permalink settings?
Thanks
: )
DaraJanuary 28, 2017 at 9:29 pm #739792Hi Dara,
Inside WordPress Dashboard, you go to Settings > Permalinks, set it to default then save changes, then set it back to the ones you have before and save it again.
Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.