Taxonomy pages not loading after posttype code moved
-
Hi all, we have a multisite in development for a client with various “divisions”. There is an mu-plugin file with various functions in that are needed across all 3 websites.
This includes about 4 custom post types which were working and loading fine on the sites. We moved 2 of those post types to the functions file of one of the sites, as they aren’t needed across all of them and whilst the archive pages work, the taxonomy pages are now broken for the ones we moved – the page loads but it says ‘not found’ as it thinks there are no posts in that taxonomy. We’ve tried:
Moving the code back to its original location
Resaving permalinks on all the sites
Resaving the settings in sites > [sitename] > edit > settings
Changing “exclude from search” back to true then back to false
Adding new taxonomies, these are still broken
Adding a new custom post type with taxonmies to the sites functions file – these don’t work either!
Add some extra arguments to our taxonomies to ensure everything is “true”
This is one of our post types and one of its taxonomies:
register_post_type( 'projects', array( 'labels' => array( 'name' => __( 'Projects' ), 'singular_name' => __( 'Project' ) ), 'public' => true, 'has_archive' => true, 'exclude_from_search' => false, 'show_ui' => true, // UI in admin panel 'menu_position' => 20, 'capability_type' => 'post', 'hierarchical' => false, 'rewrite' => array('slug' => 'projects'), 'supports' => array('title','editor','thumbnail','revisions','custom-fields','page-attriconstrbutes'), ) );register_taxonomy( 'epxsectors', 'projects', array( 'label' => __( 'Sectors' ), 'rewrite' => array( 'slug' => 'project-sector' ), 'hierarchical' => true, 'public' => true, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, ) );I’m really stumped as to what to try next. Anyone had this before or can suggest anything else to try?
Thanks in advance!
The topic ‘Taxonomy pages not loading after posttype code moved’ is closed to new replies.