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 and everything works as expected. Third-party libraries are nice and can be a godsend, but unless you are ready to get down and dirty debugging someone else’s code when things got astray, I can only recommend to steer clear of them.
Thanks to everyone who took the time to read and pitch in, much appreciated.
Related Posts:
- Setting a homepage – doesn’t seem to work
- Share parent path between Custom Post Types and Pages?
- How do I fix permalinks for custom post types that has the same slug as a page?
- Making a custom help center page
- Assign same parrent Page to pages AND custom post types
- Static page determines as home, but it is not
- Under What Conditions Can I name my CPT the same as my CPT Page?
- custom post creation on front page – on submit a search is done
- How to setup different permlalinks for posts and pages?
- How to stop a permalink redirecting to a page whit same slug but different permalink
- How to make “single post” permalink maintain it’s sub-page structure
- “regular” pages not found after changing permalink
- Custom Post Types and 404 Pages
- Category permalinks don’t work even after flushing
- Custom permalink structure for custom post types including multiple taxonomy
- Changing CPT permalink
- Add custom template ‘sub-page’ to Custom Post type?
- Permalink for specific post type
- Metabox collapsed by default
- Custom post type defaults to index.php for archive page
- Custom post type single page returning 404 error when sharing archive url with custom taxonomy
- CPT relations use in permalinks under single post type
- CPT relations use in permalinks under single post type
- How to use posts as tabs in a custom page?
- Changing permalink of default Post with custom post
- CPT and rewrite rules
- Custom Taxonomy Archive generates 404
- Custom post shows 404 after theme change
- Show date as permalink for custom post type instead of post name
- How can I get custom post types to recognize pretty permalink variables?
- Create Custom page with custom domain
- How to merge 2 custom post type permalinks
- Do not show child pages within a file page
- Disable Sidebar on certain pages
- Enabling hierarchical in a Custom Post Type gives error 404
- Custom post type single with custom URL structure
- Permalink for custom post type pages not working
- Cannot save pages after migration
- Standard Page Child of CPT Not Found (404)
- Permalinks: custom post type -> custom taxonomy -> custom sub taxonomy -> post
- Displaying posts inside table having issues
- Show posts from custom post type sorted by category/taxonomy on a one-pager/page
- Pretty Permalinks with CTP and Taxonomies / Hierarchical
- Custom post types & Pages hierarchy – Error 404
- News post with multiple permalinks? When opened from different page
- Customise Permalink Structure For Custom Post Types
- Missing permalink for custom post type
- How to change URL structure for custom post type in wordpress? Custom taxonomy + custom Post name [duplicate]
- Change permalink incrementor into pseudo-subdirectory
- CPT – Custom Text fields point to new url permalinks
- % encoded URL giving 404 error in WordPress
- Custom post pagination not working
- Two and more diffrent custom page type in one permalink
- Adding categories to custom post type in permalink
- hierarchical Custom post type child permalink not found
- Remove CPT Slug with 2 taxonomies and 1 post meta
- Custom post type and taxonomy same slug
- Change custom post type permalink according to category
- Some permalinks on Apache/localhost development setup return 404’s when set to anything other than plain permalinks
- How to create a permalink structure with custom taxonomies and custom post types
- How to structure a website with custom post types and custom taxonomies?
- Allow duplicate permalinks slugs for custom posts by different authors
- Issue with Custom Post Types and Permalinks
- How can i remove post type archive URL?
- Custom post type URL structure with site.com/custom_taxonomy_slug/post_name
- Page as parent for CPT and other pages
- Pagination not working (page/2 retunring 404 page)
- How to manage a custom post type archive as a page?
- How to manage a custom post type archive as a page?
- Include images from pages in wp search.php results in default wp search
- Permalinks change when edit published post on custom post type
- Two CPT: one is using part of the custom rewrite slug from the other
- How to redirect CPT permalinks from ID to default pretty permalinks?
- WordPress page not showing up – replaced with last 10 posts?
- Custom permalink rewrite rules – how do I fix this?
- Custom permalink with custom taxonomies for custom post type
- Creating custom post type relationships
- Custom post type slug as page slug
- Metabox messes up permalink
- Why did permalinks setting affect the pages?
- Links Image in “Catalog” Page to Posts
- Template hierarchy changes when custom post-type permalink leverages custom taxonomy
- Why does my plugin require a permalink reset after a new installation?
- Create custom YouTube-like permalinks for multiple custom post types
- Pretty permalink structure with multiple (AND OR) taxonomies
- WordPress Contents Migration
- How to retrieve custom post type permalink in another cpt?
- Associate custom CPT with another CPT’s taxonomy and rewrite permalinks
- Creating Slider in wordpress theme with custom post
- 404 custom post type
- Change the url of a custom post type to include taxonomy
- How can I make my CPT read from page-*post-type*.php?
- Permalinks for a custom post type – with a page template (custom query) and taxonomy archive
- Post Custom & Taxonomy 404 error
- how to use two permalinks for one custom post type based on categories
- Custom post URLs
- One Post with different content, depending on a Page
- WordPress custom post type rewrite rule matches all pages returning 404
- Custom Post Type Taxonomy – Permalinks generating, but posts not found
- Can I override the permalink/slug on creation