• Assalam-o-Alaikum

    I want to use custom variables in wordpress URL with permalink settings as /%postname%/. I have created a custom template page as page-home.php and using that page as Front Page. Problem is… the custom variable is working fine for inner pages but do not work on Front Page and show default index.php (blog layout) file as home page. If i remove that variable it shows Front Page on home. Even when i use another variable that is not registered, that work fine with Front Page, but registered variable does not working. Following is my code.

    add_filter('query_vars', 'my_custom_vars' );
    function my_custom_vars( $qvars ){
       $qvars[] = 'view-country';
       $qvars[] = 'view-index';
       return $qvars;
    }

    Please guide me what to do, thank you very much.

  • The topic ‘how add custom variables in wordpress URL for Front Page?’ is closed to new replies.