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!