Language switcher – home page link instead of post type archive link
-
On archive pages, when there are no posts in the given language, then the language switcher returns the links to the home page instead of post type archive links.
Example:
- There’s a
product
post type - There are 2 languages defined: EN and ES
- There are some posts of a
product
type in the EN language but no posts in the ES language - We are on the
/en/product/
page - For the EN language the language switcher shows the correct url (/en/product/)
- For the ES language the language switcher shows the ES home page URL
IMO it’s a bug. Even when there’s no post in a given language then the language switcher should still return a link to the post type archive (or it should be configurable in the plugin’s options).
So in the given example the language switcher should show the
/es/product/
URL instead of the home url. - There’s a
- The topic ‘Language switcher – home page link instead of post type archive link’ is closed to new replies.