最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

javascript - GTranslate Plugin Compatibility Issue with Integrated Lazy Page Speed in WordPress - Stack Overflow

matteradmin8PV0评论

I'm experiencing a compatibility issue between the Lazy Page Speed feature integrated into my theme and the GTranslate plugin on my WordPress site. Specifically, the Lazy Page Speed optimization is altering the tag for the GTranslate plugin, which causes it to malfunction. The altered tag appears as follows:

<script data-laps-action="reorder" type="javascript/blocked" id="gt_widget_script_XXXX-js-before">

Whereas it should normally appear like this:

<script id="gt_widget_script_XXXX-js-before">

This alteration prevents the GTranslate plugin from displaying correctly, causing issues with the language switcher and flag icons on the front-end of the site. After inspecting the issue, I confirmed that disabling the Lazy Page Speed feature resolves the problem. However, I would like to keep Lazy Page Speed enabled for the rest of the site’s performance optimizations while resolving the issue with GTranslate.

I tried disabling the Lazy Page Speed feature and found that it resolved the issue with the GTranslate plugin. However, I did not want to completely disable the optimization because it is critical for improving my site's performance. Instead, I was hoping to find a way to:

> Exclude or adjust the optimization specifically for the GTranslate plugin, so that the Lazy Page Speed optimization doesn't interfere with it.
> Ensure that the rest of the site still benefits from the performance enhancements provided by Lazy Page Speed.

I am looking for a solution that allows both Lazy Page Speed and GTranslate to work together without causing issues on the site.

Post a comment

comment list (0)

  1. No comments so far