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.

Hello I'm creating a custom url rewrite structure for my WordPress site.

First I had the following code to have url: /objekt/<GID> which loads objekt page and have query var GID.

add_action( 'init', 'objekt_url_rewrites_init' );

function objekt_url_rewrites_init(){
        'top' );

add_filter( 'query_vars', 'objekt_url_query_vars' );
function objekt_url_query_vars( $query_vars ){
    $query_vars[] = 'GID';
    return $query_vars;

Now, I need to change URL structure to /en/objekt/<GID>. So, I change




But its not working! :( Please help

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.