Displaying slider on all pages
-
Hi! First of all, I really like this layout. I’ve been searching for something like this for a really long while, it’s great.
One thing that would put it closer to 100% perfect is if I could make the slider appear on all pages & posts, not only the front page.
I made a child theme, and tried to tweak the functions.php code via that, but I wasn’t successful. Help would be most appreciated, thank you!!
This is what I put in my child theme functions.php file:
<?php // Add slider CSS only if is front page ans slider is enabled if( ( is_home() || is_front_page() || is_page() || is_single() ) && of_get_option('sparkling_slider_checkbox') == 1 ) { wp_enqueue_style( 'flexslider-css', get_template_directory_uri().'/inc/css/flexslider.css' ); } // Add slider JS only if is front page ans slider is enabled if( ( is_home() || is_front_page() || is_page() is_single() ) && of_get_option('sparkling_slider_checkbox') == 1 ) { wp_enqueue_script( 'flexslider-js', get_template_directory_uri() . '/inc/js/flexslider.min.js', array('jquery'), '20140222', true ); } // Flexslider customization if( ( is_home() || is_front_page() || is_page() is_single() ) && of_get_option('sparkling_slider_checkbox') == 1 ) { wp_enqueue_script( 'flexslider-customization', get_template_directory_uri() . '/inc/js/flexslider-custom.js', array('jquery', 'flexslider-js'), '20140716', true ); }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Displaying slider on all pages’ is closed to new replies.