• Home
  • Blog
  • Showcase
  • Setup Docs
    • Sunshine Help
    • Flex Help
  • Support
    • Support Area
    • Contact us
    • Feedback
  • Connect
    • Newsletter
    • Twitter
    • Facebook
  • My Account
  • Flex
  • Sunshine
Support : Simple Pro Themes

Support : Simple Pro Themes

Reply To: Slider on page not in a widget

If you have purchased a product, please enter the email address that you used to register at time of purchase.
Log In
Lost Password

Create an Account
  • Your username must be unique, and cannot be changed later.
  • We use your email address to email you a secure password and verify your account.

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
Chinmoy Paul
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.

Copyright © 2022 · Simple PRO Themes for Genesis Framework · About · FAQs · Contact · Affiliates