• Resolved AbstraKt

    (@abstrakt)


    Activating this on my homepage breaks my Layer Slider πŸ™

    I tried looking at your advice to individually exclude scripts, but I’m not nearly that smart with coding to figure it out. Is there an easy way to get my Layer Slider working again, without deactivating this plugin on the entire page?

    https://wordpress.org/plugins/scripts-to-footerphp/

Viewing 1 replies (of 1 total)
  • Plugin Author Joshua David Nelson

    (@joshuadnelson)

    You’ll have to find the exact script (or combination of scripts) on the home page that you want to keep in the header in order for the slider to work. I am not familiar with Layer Slider, but usually there is a jquery or two and perhaps a layer slider specific script. An easy way to check is to jot down all the scripts, then turn off the layer slider plugin, and see what is missing.

    Once you find those scripts, you’ll have to track down the script name in the plugin files. You can use that name to deregister it, via the code below in your functions.php file (using jquery in this example):

    add_action( 'wp_print_styles', 'my_deregister_styles', 100 );
    add_action( 'wp_head', 'my_head_scripts' );
    
    function my_deregister_styles() {
    	wp_deregister_style( 'jquery' ); // script name
    }
    
    function my_head_scripts() { // the html for the script as originally outputted
    	?>
    	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <?php
    }

    You can also just disable the plugin on that specific page if that is too difficult. Scripts are loaded dynamically and can be done so in many different ways, making it difficult to be specific on a broad plugin like this one.

    Hope that helps.
    Joshua

Viewing 1 replies (of 1 total)
  • The topic ‘LayerSlider Broken’ is closed to new replies.