vsalvans
Forum Replies Created
-
Hi @kbat82,
Yeah it works fine in the preview.
The custom CSS is returned by the
ob_get_clean()
call I make inside the function, rather that assign a normal string to a variable and return it, because for me, is more clear to see the CSS as I posted i the previous comment.Thanks!
It worked!
This the code I used:
add_filter('metaslider_preview_styles', function($styles) { ob_start(); ?> #cookie-law-info-bar, #cookie-law-info-again, .cli-modal, .zopim { display:none!important; } <?php return ob_get_clean(); });
Thank you very much for your help! I’ve already “five-rated” it ??
Sure!
The EU Cookie consent link is : https://es.www.ads-software.com/plugins/cookie-law-info/
The other plugin is actually a custom code that injects a script from a function that is hooked like this:
function custom_plugin_hook_javascript_footer() { ?> ... some script to add the zendesk widget .. <?php } add_action('wp_footer', 'custom_plugin_hook_javascript_footer');
I guess the first plugin is doing something similar as it place content after the “footer” tag.
I hope all your scripts you need don’t need that hook or action.
Thanks
The metaslider works fine on the website, but if you edit the page where the slider is at, the slider preview “iframe” loads (wp loading icon appears) and then it shows the slider properly but in the same “iframe”, right after the slider other plugin content appear.
In the screenshot example is the content of the EU Cookie Consent plugin that it appears at the bottom of all pages of the entire site. The same content appears when editing a page in every single block (wordpress visual editor) that contains a metaslider widget.
When I enter to edit the page where slider is and it’s still loading
https://ibb.co/q0G8YPyWhen it loads and shows the slider preview
https://ibb.co/Yj3MkPyIt happens with multiple plugins that somehow add content at the bottom of the page.
For instance if the WPML language switcher is configured to be at the bottom of the page like “english spanish french” those links appear also right after the metaslider preview in the block editing area.
I use Woocommerce plugin and Storefront theme if this info helps.