Thanks for referencing my solution. You forgot one part though – defining the rewrite of your cpt. From my solution:
First get your slugs right when defining your custom post types and
taxonomies: for the custom post type it should be
basename/%taxonomy_name%
and the slug for your taxonomy should be
just basename. Dont forget to also add ‘hierarchical’ => true to the
taxonomy rewrite array to get nested terms in your url. Also make sure
query_var is set to true in both cases.
So in your case your rewrite for your custom post type should be producten/%productcat%
. Also it looks like in my filter_post_type_link
function you need to change %taxonomy_products%
to %productcat%
.
Hopefully that will make it work!
Related Posts:
- How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name
- How to check if last uri segment is a custom post type or taxonomy term?
- Custom Taxonomies: Multiple Hierarchical Permailnks For A Single Post + Prev/Next Links
- How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name
- Custom Post Type with two hierarchical Custom Taxonomies: strategy to generate best permalink structure
- How to create custom url structure based on custom post type rewrite slug, taxonomy and category slug?
- Hierarchical permalinks for custom post type and taxonomy
- Custom post type Permalinks with hierarchical Taxonomies
- Ideas on how to organize a project [closed]
- How can I add a “fake” parent into the permalink?
- taxonomy term names in custom post type permalink structure
- How to develop Knowledge center in WordPress Website
- Use different taxonomies in different custom post types’ permalinks?
- Should I use custom taxonomy or custom post type
- custom permalinks based on taxonomies for custom post type
- Custom template won’t load for a custom post type (custom permalinks used)
- Custom taxonomy in URL showing 404
- Custom Post Type / Two level deep taxonomy (cat. and subcat.) uri problem (error 404)
- Hierarchical Custom Post Types in Array
- Missing Posts in Custom Taxonomy List
- Custom Post Type permalink shows wrong page: homepage/index.php
- Disable block with taxonomies at post page
- Which post does a taxonomy term belongs to?
- How to hook custom taxonomies to custom post types and make the permalinks work?
- List custom taxonomy specific to one custom post type
- Custom post type url with category
- Adding custom post category slug in permalink causes 404 error for pages and posts
- Add custom post type settings to wordress default posts
- How Can I Change the Custom Post Type Slug to the Taxonomy Slug in the URL?
- Use same slug base for Custom Post Type posts, and multiple taxonomy terms
- How to have the same url structure for both a CPT and a Taxonomy?
- create a subcatagory for a custom post type and out put url as posttype/subcategory/item
- Get related posts of child term of custom post type
- custom-taxonomy/post_name instead of the default post_type/post_name
- Show custom post archive when custom post not specified
- Show custom post type relationships by taxonomy
- Can’t remove front from permalinks for custom taxonomy category page
- How to set a CPT to have a page as a parent, then rewrite urls accordingly?
- Removing custom post type slug from URL
- Customize Custom Post Type URL
- Permalinks /country/city/cpt/postname/
- Rewrite Rule for showing Parent/Child Relationship between Two Hierarchical Custom Post Types
- Seamless permalinks between Custom Taxonomy and Custom Posts
- Custom post type and custom taxonomy with the same slug using the file page taxonomy only as directory
- Need help with permalink rewrites for Custom Post Types with hierarchical relationships
- Custom Permalinks with CPT and Hierarchical Taxonomies
- How to have this permalink structure: post_type/postname/custom_inner_page
- Custom Permalink Structure for Custom Post Type, Custom Taxonomy, Under a page
- Custom taxonomy returns 404
- Custom while loop for hierarchical display of a taxonomy
- Get the taxonomy of a post hierarchically
- Permalinks: custom post type -> custom taxonomy -> post
- CPT’s with landing page instead of archive – Url Rewrite?
- How to change permalink to include custom post type
- Custom post type, permalinks, taxonomies and blog posts
- Custom post type permalink tag 404
- Custom post type / taxonomy rewrite archive page 2 gives 404
- Permalink structure with custom taxonomies and custom post type like /parent-tax/child-tax/custom-post-type-name (with no base name)
- permalink /category/post-name with custom post type and taxonomy
- Create more category hierarchical depth for custom post type/taxonomy plugin (widget)
- Hierarchial Custom Post Types/Taxonomies
- Custom post type and taxonomy permalinks
- set permalink for CPT
- Custom permalink with child taxonomy terms
- Create a permalink structure with custom taxonomies and custom post types gives 404
- WP the_posts() on single-cars.php get category link
- Permalink misbehaving in Custom Post Types
- Check post on publish for blank title
- How to solve this custom post type goes to 404 page?
- Best way to specify “article type” in URL
- Template files for Custom Post Type and Taxonomy
- Custom Post type & Taxonomy 404
- Can’t use pagination with custom taxonomy
- Variable not working in WP_Query
- How to Display Posts From Category Within a Custom Taxonomy?
- Template for custom post type when taxonomy is in the URL
- Permalink problems with custom post type and custom taxonomy
- How to implement a different permalink structure for custom post type?
- Custom Post Type Advanced Slug
- custom hierarchical taxonomy and custom post type list contains surplus posts
- display posts of custom post type with custom taxonomy
- Creating a non-hierarchical Taxonomy that behaves like categories
- How to filter a custom post type by custom taxonomy without 404
- How to get all posts related to particular category name on button click?
- Migrating Hierarchal Taxonomy Categories Between Post Types
- WordPress custom permalink and archive link for custom post type
- How to query Posts from a custom post type which contains a custom taxonomy?
- Copy/Move selected taxonomy terms to another taxonomy for posts
- How should I structure complex content hierarchies?
- Different structure/content for posts from a custom post type
- List all posts in taxonomy term
- Enabling permalinks disables custom page template
- List child categories from parent category on custom taxonomy page
- Change permalinks for custom post type based on taxonomy term
- custom taxonomy listing returns no posts
- Using page title as a link to term archive
- How to setup different permlalinks for posts and pages?
- Custom post type category permalinks and archive pages
- Is it possible to have hierarchical taxonomy and hierarchical custom post types in one permalink?
- Making a form for user to add new custom post with custom taxonomies and custom fields