Support » Plugin: Livemesh Addons for Elementor » Remove inline styles of post slider

  • Resolved lasithhh

    (@lasithhh)


    Hi,
    Is it possible to remove the inline styles of the post slider and load them through an external file. Thank you

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author livemesh

    (@livemesh)

    Inline styles are typical of sliders since they are generated by Javascript on the fly to help support responsive slider function. This is true of most slider libraries including the one that we use – Slick.

    If you think you are something else that can truly be moved to a separate file, pls clarify. We can surely help.

    Thread Starter lasithhh

    (@lasithhh)

    I need this for the Content Security Policy. Please let me know how can I move the styles to a separate file. Thank you

    Plugin Author livemesh

    (@livemesh)

    Can you pls provide me details about which inline styles you are referring to? A screenshot of the styles you see on your site will help. Thanks

    Thread Starter lasithhh

    (@lasithhh)

    Hi, please find the html code below

    <div class="lae-post-overlay lae-post-featured-img-bg" style="background-image: url(......); height: 575px;">

    Thread Starter lasithhh

    (@lasithhh)

    Plugin Author livemesh

    (@livemesh)

    Thanks for clarifying.

    This can be done safely since we make use of templates extensively in our plugin.

    Will post a solution in the next few hours to help move the CSS to a file.

    Thread Starter lasithhh

    (@lasithhh)

    Thank you

    Plugin Author livemesh

    (@livemesh)

    Please override the existing template file –

    wp-content/plugins/addons-for-elementor/templates/addons/posts-slider/style-1.php

    by copying it to the folder –

    wp-content/your-theme/addons-for-elementor/addons/posts-slider/style-1.php

    Once copied, you can modify the file line number 38 from –

    <div class="lae-post-overlay lae-post-featured-img-bg" style="background-image: url(<?php echo $image_src; ?>); height: <?php echo $settings['slider_height']; ?>px;">

    to

                <div class="lae-post-overlay lae-post-featured-img-bg">
    
                    <img src="<?php echo $image_src; ?>" alt="<?php echo $settings['display_title']; ?>" class="lae-image"/>

    and you are all set.

    Pls make sure the images are all same aspect ratio since we are trying to move from background image to IMG tag.

    Thread Starter lasithhh

    (@lasithhh)

    Thank you very much for the support.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Remove inline styles of post slider’ is closed to new replies.