Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display bug of the cpel_switcher. #15

Closed
Guillaume-Samson opened this issue Nov 8, 2023 · 1 comment
Closed

Display bug of the cpel_switcher. #15

Guillaume-Samson opened this issue Nov 8, 2023 · 1 comment

Comments

@Guillaume-Samson
Copy link

Hello 🙂.

It's not a big problem, but it is a bit annoying. 😅.

When a page is loaded, the CSS of the "lang switcher" seem to load 1sec after the rest of the page.

Every time a page is loaded, the problem occurs. The result is a small lag in the page, especially when the widget is integrated into the header.

The HTML is displayed correctly, but for 1 or 2 seconds, the CSS does not cover the cpel_switcher.

Just a guess, but I've noticed that the plugin's CSS resources load in the footer, not into the header.


BUG_ELEMENTOR_POLYLANG

I've disabled the cache, or other plugins, but the problem is still there.

By the way, this plugin is really useful 😀

@Guillaume-Samson
Copy link
Author

Edit : I found the solution on the previous issues.

#3

The solution was very simple: load the CSS in the header instead of the footer.

add_action( 'elementor/frontend/after_enqueue_styles', function(){ wp_enqueue_style( 'cpel-language-switcher' ); } );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant