Okay i got it working now.. I guess its not very clean but it works for me..
First of i fixed the missing slug
in the $rewrite
for the register_taxonomy
but that wasn’t really the issue..
- Since I got (and need) the dynamic value in first place I created a empty dummy parent page for my pages i wanted to show an put them in it. I called it
content
. (Well i could just have altered the permalink manually but.. i didn’t) - Now added a new Rewrite Rule to let the pages use the correct query_string
.
function funny_unicorn_rewrite_rules() {
add_rewrite_rule(
'^content/([^/]*)/?$', // use "content" as prefix to identify my pages
'index.php?pagename=content%2F$matches[1]', // fix the query string
'top'
);
}
add_action('init','funny_unicorn_rewrite_rules');
In order to make this work I needed to put the parent page back into the string with content%2F
right in front of the $matches[1]
And of naturally i flushed the rewrite rules after making the changes..
so the only matter which remains.. it wont work with WPML.. when i got a fix for that as well i’ll update this post!
cheers