• 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.