CPT and rewrite rules

Finally, found a solution mix: The CPT has to have: ‘has_archive’ => ‘library’, // Fixes the archive URL. ‘rewrite’ => array( ‘slug’ => ‘library/%library-category%’, ‘with_front’ => false, ) Taxonomy should be as following: ‘rewrite’ => array( ‘slug’ => ‘library’, ‘with_front’ => false, ), And than you need to rewrite the links: /** * Custom rewrite … Read more

Custom Post Type Single Page and Archive Page redirects to Home Page

After hours of debugging I noticed that the problem was only reproduced when I used the library. Even if I used register_post_type, if I used any other functionality from the library before the register_post_type function call, it would cause some erratic behaviour. I opted on removing PostTypes from my project and simply sticking to register_post_type … Read more