Hi @denisgomesfranco,
That’s interesting. I believe this will only happen if the plugin thinks it’s on an admin page, as in is_admin() is true. I never used Elementor, so what do you expect to see on this page? Is this only for logged in users?
if is_admin() is returning true then I wonder if that’s a bigger Elementor issue that needs to be looked into.
Then I think then maybe that’s the case, is_admin() being true since Elementor is launched via the post/page edit screen.
Elementor is one of the best visual page editors out there, and it is just like Visual Composer, Beaver Builder, etc. But one of the greateast advantages is that Elementor is WYSIWYG, so you get a pixel-perfect preview while editing.
It has built-in modules (including a slider module, but Meta Slider is better) and it can also insert WordPress widgets and WordPress shortcodes. I expected to see Meta Slider running as it would run when the site is accessed.
As I said this is just a minor cosmetic issue, it causes no problems when editing the page, but it would be nice to see Meta Slider as it would actually display on the site.
I’ll try to find out whether Elementor has a special function to determine if you’re on an Elementor “admin” page, that way you see the slideshow rather than the admin stuff.
@kbat82 did you find out if Elementor has an is_admin() like method?
Hi @salzano,
I’m not sure but I found another way to fix this issue. Are you having an issue with MetaSlider and Elementor? Can you open a new issue?
https://ww.wp.xz.cn/plugins/ml-slider/#new-post
@kbat82 Thanks for the reply. I figured out the issue, and no, I’m not using MetaSlider.
Elementor disobeys is_admin() because it loads posts and pages in an <iframe> instead of the post editor. WP responds with the post or page like it would for any viewer on the front end, and wp_admin() is false. I found that a query string parameter called elementor-preview is set to the post ID in this case.
Ah okay. I would just check to see how long that param has been there and if they plan on keeping it. I believe they do have a function that will tell you if you are on an elementor page but it just turned out I didnt need it.
https://github.com/elementor/elementor/issues/6736
Even better! Thanks again.