- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
In wordpress how do I get a permalink structure like this:
/%taxonomy_name%/%taxonomy_category%/%post_type%/%post_name%/
for example:
http://www.my-domain.com/teams/varsity/games/game-15/
thanks!
UPDATE:
ok, so this code does the trick:
‘rewrite’ => array(‘slug’=>’/teams/%teams%/games’),
however I get a 404 when I try to access the post. I know it works because I saw the permalink change in the Edit Post page to how I wanted it.
I already tried re-saving my Permalinks settings in the wordpress admin and I also made sure my .htaccess file is writeable. Both didn’t resolve the issue.
Any ideas
UPDATE:
Ok I figured that one out.
My taxonomy rewrite needed to be set to true.
Now I cant use my page that I have created that corresponds with each taxonomy category. It is using a template that displays each post type in that taxonomy category. Now it goes to the Archives and displays all the custom post types in one loop. This displays my posts in a random order rather than having each post type separate like I have in my template.
So how can I change it to say this
if ( is taxonomy category 1 ) { }
if ( is taxonomy category 2 ) { }
if ( is taxonomy category 3 ) { }
thanks
If you haven’t figured this out yet, WordPress Conditionals are the way to go…
great! is_tax() did the trick. thanks!