Links to blog ignore current language on search result and paged content
-
I have a helper in my template to output the links to the existing lanuages as links:
function the_languagelinks() { if ( class_exists( 'MslsOutput' ) ) { $obj = new MslsOutput; $arr = $obj->get( 1 ); if ( !empty( $arr ) ) { echo '<div class="languages">'; echo implode( ' | ', $arr ); echo '</div>'; } } }
This works on regular pages and posts – but for search results and paged content also the current language will show as link, even though I’ve set the option “Show only links with a translation” in all languages.
Examples:
OK (current language is not a link):
https://arnowelzel.de/wp/en/category/web
https://arnowelzel.de/wp/en/projects/wordpress/multicolumn-category-widgetNOT OK (also current language is a link):
https://arnowelzel.de/wp/en/category/web/page/2
https://arnowelzel.de/wp/en/?s=raspberryAny idea?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Links to blog ignore current language on search result and paged content’ is closed to new replies.