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 typeWhen 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_postThen 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.phpfile.A)
Leave the last parameter (the url) from theadd_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 thepost_typequery param as well. Of course by querying it from the$_GETsuperglobal, similar to the taxonomy param.
The topic ‘Language switch: wrong taxonomy url’ is closed to new replies.