Archived topic
Filtre generate_logo_href not work
6 replies · Started by Romain on December 1, 2020
Good morning all,
I am using polylang and would need to change the logo url so that it points to the correct homepage.
After some research on the forum I came across the generate_logo_href filter.
I have the impression that this one is not working.
I tried the following function but the url is still the same.
add_filter( 'generate_logo_href', function() {
$home_link = pll_home_url(pll_current_language());
return $home_link;
} );
Do you have an idea
Romain
Hi there,
Can you try this one instead?
https://generatepress.com/forums/topic/wrong-link-from-mobile-logo-in-header-using-polylang/#post-780066
Hi,
Yes I tried this solution, when in doubt, I even tried to return a different string (url) and nothing is changed.
Romain
How are you adding the code?
Can you link me to the page in question?
The code was added in the functions.php file of my theme (child).
The problem is visible on:
https://rdr-it.com: site root in French so url ok
https://rdr-it.com/en: url on the French version
https://rdr-it.com/es url on the French version
Romain
Sorry, the filter works fine ... You just have to do the same thing on the title :)
Hi,
Sorry, the filter works fine … You just have to do the same thing on the title
Is this issue resolved?
To clarify: are you asking the filter for the site title as well? let us know.
Let us know. :)