Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Site Logo Not Displaying After Translating Website with WPML

  • 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.php of 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?

  • 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!

  • 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?

  • 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.

  • 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

  • Solved! Thank you.

  • You are welcome   🙂

  • 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 🙂

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.