Archived topic
Logo Link always links to english on my multi language site
11 replies · Started by Simon on July 14, 2021
Hi,
on my site the logo link always links back to the homepage in english.
this is my site https://www.indexuniverse.eu/
i had the free generate press version before and it worked there.
https://www.indexuniverse.eu/de/ for example links back to https://www.indexuniverse.eu
Hi there,
try adding the PHP Snippet that Tom provides here:
where do i have to add it?
Hi Simon,
Check this on how to add PHP: https://docs.generatepress.com/article/adding-php/
Its not working
i added it like this
https://prnt.sc/1b547z2
Check if the snippet is Activated and saved.
Usually, the link should link back to the front page of this language by default.
Are you using the Polylang plugin?
yes i use Polylang
and as i said.
i used the free version of generatepress and it worked.
now i upgraded and choose another theme from the site library.
and yes the snippet is activated and saved
i used the free version of generatepress and it worked.
So if you disable the GP premium plugin it works?
yes.
if i disable it it works.
so i need to diable it?
but i lose all the features
Odd - i checked your site and you don't have a logo - i see just the site title - so that code shouldn't work for either free or GP Premium. You would need this snippet to filter the Title:
add_filter( 'generate_site_title_href', function( $url ) {
if ( function_exists( 'pll_home_url' ) ) {
return pll_home_url();
}
return $url;
} );
working now
thanks =)
Glad to hear that!