Slider on every page

Hi @Movin,
In the previous version I was using the code below to display the slider on every page. Since the update, it does not work. I get a blank white screen. Your help is appreciated! :slight_smile:

function custom_sparkling_scripts(){
    if( of_get_option('sparkling_slider_checkbox') == 1 ) {
        wp_enqueue_style( 'flexslider-css', get_template_directory_uri().'/assets/css/flexslider.css' );
      // Add slider JS only if is front page and slider is enabled
      wp_enqueue_script( 'flexslider-js', get_template_directory_uri() . '/assets/js/flexslider.min.js', array('jquery'), '20140222', true );
      // Flexslider customization
      wp_enqueue_script( 'flexslider-customization', get_template_directory_uri() . '/assets/js/flexslider-custom.js', array('jquery', 'flexslider-js'), '20140716', true );

add_action( 'wp_enqueue_scripts', 'custom_sparkling_scripts' );

Hi @packerlandwebsites,

Sorry to hear of the problem you are having.

Could you please share me your child theme that contains this custom code so that i can troubleshoot it on my test site and make necessary changes in it to make it work with latest version of theme?

Best Regards,

Since everything wasn’t working correctly, I commented out what wasn’t working in the functions

To make it work i have modified your child theme code and attached modified child theme to this reply.

That worked perfect! Thank you!

What did you do? I can’t seem to find anything different, other than the one line of css was commented out.

You are most welcome here :slight_smile:

Yes along with that commented out the code in the functions.php file and changed slider CSS & JS files URLs.

You can compare theme old and new files to find out the exact changes made.