I would like to translate a website into Polish, but when I open the website, the customer support provides a script that I pasted, which worked only when I typed in the homepage URL. However, when I reload the page or move to the next page, the script stops working, and it also does not work if I enter a different page URL. How can I make it work using the free version of gt translate?
<script> if (typeof(Storage) !== "undefined") {
if (localStorage.getItem("ChangeLanguageFirstTime") === null) { setTimeout(function() {
const element = document.querySelector('a[data-gt-lang="es"]');
if (element) {
element.click();
localStorage.setItem("ChangeLanguageFirstTime", true);
}
else {
console.error('Element not found!'); } }, 3000);
}
} else {
console.error('localStorage not supported in this browser!');
}
</script>
]]>Thanks in advance.
Widget look: (beta) Popup
]]>Lighthouse returned error: NO_FCP
is someone with the same error, or does anyone have any solution ?
Best regards
]]>Steps I’ve taken that normally fix this:
1. Enabled debug and debug log in config but no debug log is showing up in wp-content.
2. Clear the cache, disabled all plugins (still does it), tried to change themes (fails). The only way I can add themes or plugins is through FTP.
3. I changed the .users.ini file to max out all memory still have the issues.
4. Found a couple responses on the forum but none have worked.
I’m not sure what else to do. Any resources or help is greatly appreciated.
Thanks, B