-
YEAR93
Since translating my website with WPML, I’ve noticed that my site logo doesn’t always display it appears correctly in the source code, but it’s not visible in the header.
This only started happening after the WPML translation. On the original (Dutch) version, everything displays almost correctly expect on the homepage the site logo isn’t showing. On the English version on all the pages the site logo isn’t visible on the front-end.
I’m currently using the following code snippet added to
fucntions.phpof my child theme to switch to a different color variant of the logo on the homepage:// Change logo on homepage add_filter( 'generate_logo', function( $logo ) { // Return our category logo URL if ( is_front_page() ) { return '[Homepage logo media url here]'; } // Otherwise, return our default logo return $logo; } ); // Change retina logo on homepage add_filter( 'generate_retina_logo', function( $logo ) { if ( is_front_page() ) { return '[Default site logo media url here]'; } return $logo; } );Could you please help me figure out why the logo isn’t displaying properly on the translated version and how I can fix this?
Thank you in advance!
-
Hi there,
Can you go to customizer > site identiy and remove the retina logo to test?
-
YEAR93
Thanks for your response. I’ve removed the retina logo both in the Customizer and in my snippet inside
functions.php.On the original Dutch version of the website, the logo now displays correctly again both on the homepage and on all other pages.
However, on the English version of the website, the logo only appears on the homepage, and it’s still missing on all other pages.
-
It’s very strange, the logo is not in the HTML at all, like it’s been removed completely.
Can you disable all other plugins except GP Premium and WPML to test?
Switch to the parent theme as well.
Let me know how it goes!
-
YEAR93
I can’t fully debug the website right now since it’s live and in use. Is there any other solution or workaround you can suggest without having to disable all plugins or switch themes at this moment?
-
I would recommend creating a staging site and debugging on it.
I can see the logo in the customizer, so I wonder if it’s a cache issue.
Can you at least disable all caches to test?
-
YEAR93
Disabling the LiteSpeed Cache plugin resulted in the logo reappearing on all pages of the original Dutch version.
However, on the translated English version, the logo only shows on the homepage it’s still missing on the other pages.
It definitely seems related to the LiteSpeed cache. So, would it be fine if I re-enable the retina logo again?
-
No, I would recommend avoiding using the retina logo, since your logo is SVG, there’s no difference in retina logo and the regular logo.
-
YEAR93
Okay, thank you. I’ll contact Litespeed Cache support.
One more thing: I accidentally moved the Display Rules panel in the Elements editor and now it’s in the right-hand column. How can I reset it back to the bottom?
-
Clicking the up arrow should bring it back to the bottom:
https://app.screencast.com/k6GyMQ8pykcS4 -
YEAR93
Solved! Thank you.
-
You are welcome 🙂
-
YEAR93
It’s all working now the issue was caused by the LiteSpeed Cache “CSS Minify” setting. Disabling that fixed the problem.
Thanks for your help!
-
Glad to hear that 🙂
- You must be logged in to reply to this topic.