Search code examples
wordpressurlpermalinkstaxonomy

Wordpress - Dynamic "static" permalink based on permalink taxonomy


I'm running an application that has a problem that I'll be glad if anyone help me with it.

Today, my permalink looks like:

http://example.com/%estado%/%category%/%postname%/

(Where %estado% is a custom taxonomy I've created. Already working and stuff)

And I want to:

http://example.com/%estado%/%dynamic%/%category%/%postname%/

In that way...

if %estado% == 'br' $dynamic = 'dou' else $dynamic = 'doe'

But I can't figure out how to.

Anyone?

Thanks in advance! :)

(Sorry for the bad english)


Solution

  • Solved by creating a new taxonomy for the "dynamic" path.