Title: Permalink Base = Query Var?
Last modified: August 20, 2016

---

# Permalink Base = Query Var?

 *  Resolved [ratterobert](https://wordpress.org/support/users/ratterobert/)
 * (@ratterobert)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/permalink-base-query-var/)
 * Will the value entered in the “query var” field be used like the category base
   in the permalinks-settings? If its intended like that, I have to say it doesn’t
   work.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Daedalon](https://wordpress.org/support/users/daedalon/)
 * (@daedalon)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/permalink-base-query-var/#post-2260465)
 * I am also wondering how is the Query Var field used. The link in WP plugin info
   page leads to a page with a link to github page which says nothing to see there.
 *  [Daedalon](https://wordpress.org/support/users/daedalon/)
 * (@daedalon)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/permalink-base-query-var/#post-2260466)
 * Class.client.php seems to be the code where it’s used, starting from line 42:
 *     ```
       // Rewrite
       if ( $taxonomy['rewrite'] == 'true' ) {
         $taxonomy['rewrite'] = array( 'slug' => $taxonomy['query_var'], 'with_front' => true, 'hierarchical' => false );
       }
       ```
   
 *  [Chris Talkington](https://wordpress.org/support/users/ctalkington/)
 * (@ctalkington)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/permalink-base-query-var/#post-2260467)
 * This is because of a bug in the code, if you want to restore this logic until
   the dev gets around to it, you should be able to edit class.client.php. I have
   posted changes in the gist below but here is a summary. Make sure to update your
   permalinks after setting the query var otherwise you might run into some issues
   with links not working.
 * to replicate how the var was being handled i first added
 *     ```
       $taxonomy['rewrite'] = (boolean) $taxonomy['rewrite'];
       ```
   
 * above line 43
 *     ```
       if ( $taxonomy['rewrite'] == 'true' ) {
       $taxonomy['rewrite'] = array('slug' => $taxonomy['query_var'],'with_front' => true, 'hierarchical' => false);
       }
       ```
   
 * which i also tweaked a bit to be
 *     ```
       if ($taxonomy['rewrite']) {
       $taxonomy['rewrite'] = array( 'slug' => $taxonomy['query_var'], 'with_front' => true, 'hierarchical' => false );
       }
       ```
   
 * then removed
 *     ```
       (boolean)
       ```
   
 * from line 56
 *     ```
       'rewrite' => (boolean) $taxonomy['rewrite'],
       ```
   
 * [https://gist.github.com/1621776/4ad0180cd370508d04fd4976bad761848384589e](https://gist.github.com/1621776/4ad0180cd370508d04fd4976bad761848384589e)
 *  [Daedalon](https://wordpress.org/support/users/daedalon/)
 * (@daedalon)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/permalink-base-query-var/#post-2260468)
 * How does the Query Var setting behave after this?
 *  Plugin Author [Amaury Balmer](https://wordpress.org/support/users/momo360modena/)
 * (@momo360modena)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/permalink-base-query-var/#post-2260512)
 * Thanks for reporting
    This bug will be fixed on version 3.4.1
 * Changes on :
    [https://github.com/herewithme/simple-taxonomy/commit/f1fe8bd6c6d02643e3a23da8e0a0258080728442](https://github.com/herewithme/simple-taxonomy/commit/f1fe8bd6c6d02643e3a23da8e0a0258080728442)

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Permalink Base = Query Var?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/simple-taxonomy.svg)
 * [Simple Taxonomy](https://wordpress.org/plugins/simple-taxonomy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-taxonomy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-taxonomy/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-taxonomy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-taxonomy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-taxonomy/reviews/)

 * 5 replies
 * 4 participants
 * Last reply from: [Amaury Balmer](https://wordpress.org/support/users/momo360modena/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/permalink-base-query-var/#post-2260512)
 * Status: resolved