• Resolved bearstar

    (@bearstar)


    Does Weglot work with WP Rocket? We have found that when WP Rocket is turned on and a user flips to German (our site is in English and German), the little flag indicators don’t allow the user to switch back to English. When we disable WP rocket there are no issues.

    Also, we were finding that the German version of the page was coming up as the default (english) home page when WP Rocket was enabled. I tried to exclude /de from wprocket caching, but that didn’t stick and the problem kept recurring.

    Is there a trick to making WP Rocket and Weglot work well together?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi @bearstar ,

    hope you’re fine? Sorry for the issue your facing.

    For you first issue you can try this snippet :
    `<script>
    document.addEventListener(“DOMContentLoaded”, function(){
    var origLink = document.querySelector(“a[href$=\”wg-choose-original=true\”]”)
    if(origLink) {
    origLink.addEventListener(“click”,function(e) {
    var href = this.href;
    e.preventDefault();
    document.cookie = “WG_CHOOSE_ORIGINAL=1; path=/;”;
    window.location = href;
    });
    }
    });
    </script>

    It should be fix you second issue too. but for the second if it’s not fix, we work to improve the relation between wp rocket and weglot on our next release

    Don’t hesitate if you need more help
    Regards

    Thread Starter bearstar

    (@bearstar)

    Thank you. Will give it a try.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Weglot and WP Rocket’ is closed to new replies.