Title: Language switch: wrong taxonomy url
Last modified: October 18, 2019

---

# Language switch: wrong taxonomy url

 *  [csisy](https://wordpress.org/support/users/csisy/)
 * (@csisy)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/language-switch-wrong-taxonomy-url/)
 * Hi,
 * First of all, thanks for the great plugin, it works fine for my needs.
    However
   there is a minor problem in the scenario shown below:
 * The setup:
    – have a custom post type – have a custom taxonomy connected to the
   custom post type
 * When I go to the edit screen of the custom taxonomy the url contains both the
   taxonomy and the post type slug. Eg. `edit-tags.php?taxonomy=my_tax&post_type
   =my_post`
 * Then if I click on one of the language switch links it does not keep the post_type
   parameter, so the screen is switched to the default post type (which is the ‘
   post’). Found the code, you just have to make one of these two changes in the`
   include/terms-table-language-switch.php` file.
 * A)
    Leave the last parameter (the url) from the `add_query_arg` – this way, according
   to the wp docs: `Omitting the URL from either use results in the current URL 
   being used (the value of $_SERVER['REQUEST_URI']).`
 * B)
    Simply add the `post_type` query param as well. Of course by querying it 
   from the `$_GET` superglobal, similar to the taxonomy param.

The topic ‘Language switch: wrong taxonomy url’ is closed to new replies.

 * ![](https://ps.w.org/sublanguage/assets/icon-128x128.png?rev=1197494)
 * [Sublanguage](https://wordpress.org/plugins/sublanguage/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sublanguage/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sublanguage/)
 * [Active Topics](https://wordpress.org/support/plugin/sublanguage/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sublanguage/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sublanguage/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [csisy](https://wordpress.org/support/users/csisy/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/language-switch-wrong-taxonomy-url/)
 * Status: not resolved