How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name

After combining a bunch of pieces of other answers I got it working! So here’s the solution for those of you who are struggling with this too: This post and this one helped me out some, so thanks to those guys. Note, all this code, plus your initial custom post type and taxonomy registration code … Read more

Custom post types, taxonomies, and permalinks

Change slug in your post type arguments to products/%product_cat%, and slug in your taxonomy arguments to just products, then flush your rewrite rules. WordPress should now handle /products/my-product-cat/post-name/! Now finally, we need to help WordPress a little with generating permalinks (out of the box, it won’t recognise the permastruct tag %product_cat%): /** * Inject term … Read more