I'm registering a Custom Post Type and in the rewrite array I am trying to do something like this:
'rewrite' => array('slug' => "explore/resources/".$CATEGORY, 'with_front' => false)
I want the rule to 'dynamically' get the post's category name somehow. I also tried using %category% there but it doesn't work either. I need the post's url to represent the entire path/route to it. Any ideas on how to achieve this?
UPDATE: Here is more clarification:
I have a custom post type of 'resources' and these post have several different categories like 'forms', 'mp3' etc. now this Resources area in the site is under another section (that is a page with custom loop for those custom posts) which is called Explore. What I want to achieve is:
domain.com/Explore/Resources/Resource-Category/Resource-Name
or
domian.com/explore/resources/forms/production-form-1
My current rewrite rule in register_post_type() is:
'rewrite' => array('slug' => "explore/resources", 'with_front' => false).
Thanks!