Support › Forums › Flex Theme › Slider on page not in a widget › Reply To: Slider on page not in a widget
August 12, 2015 at 11:51 am
#480
Moderator
Here is the another approach. You will add the following code in functions.php file.
Code is for box-slider:
/* Slider on Static Page */
add_action( 'genesis_after_header', 'flex_slider_static_page' );
function flex_slider_static_page() {
if( is_front_page() ) {
$args = array (
'limit' => 5,
'type' => 'box-slider',
'animation' => 'fade',
'slideshowSpeed' => 7000,
'animationSpeed' => 1200,
'pagination' => 1
);
the_widget( 'Flex_Slider', $args );
}
}
Code for full width slider:
/* Slider on Static Page */
add_action( 'genesis_after_header', 'flex_slider_static_page' );
function flex_slider_static_page() {
if( is_front_page() ) {
$args = array (
'limit' => 5,
'type' => 'full-width',
'animation' => 'fade',
'slideshowSpeed' => 7000,
'animationSpeed' => 1200,
'pagination' => 1
);
the_widget( 'Flex_Slider', $args );
}
}
You can change the value of args array as per your requirement.