Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am attempting to create a hierarchical list of products in WordPress 3.5.1. For example if the custom post type product was in the custom taxonomy Outdoor > Garden Tools > Hoses, these would be the desired permalinks:

/outdoor/garden-tools/hoses/mega-hose/ (loads the single.php template)

/outdoor/garden-tools/hoses/ (loads the archive.php template)

What is the best practice approach to achieving this?

I have generated the permalinks with all multiple levels of parent categories successfully for the posts and terms using the post_type_link and term_link filters respectively. There appears to be a problem with the URL rewriting though as the permalinks return 404 responses, I can't seem to figure out how these requests are functioning (where "xx" can be any string):

/xx/mega-hose/ (returns mega hose page)

/xx/xx/mega-hose/ (redirects to /outdoor/garden-tools/hoses/mega-hose/ and returns a 404)

Any help would be much appreciated!

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.