Hi @webtrader,
Add following code in your child theme’s functions.php file.
/**
* Modify parent slider option to randomize the slider
*/
function helena_featured_slider() {
//helena_flush_transients();
global $wp_query;
$enable_slider = apply_filters( 'helena_get_option', 'featured_slider_option' );
// Get Page ID outside Loop
$page_id = $wp_query->get_queried_object_id();
// Front page displays in Reading Settings
$page_for_posts = get_option( 'page_for_posts' );
if ( 'entire-site' == $enable_slider || ( ( is_front_page() || ( is_home() && $page_for_posts != $page_id ) ) && 'homepage' == $enable_slider ) ) {
if ( ( !$output = get_transient( 'helena_featured_slider' ) ) ) {
echo '<!-- refreshing cache -->';
$output = '
<section id="feature-slider">
<div class="wrapper">
<div class="cycle-slideshow"
data-cycle-log="false"
data-cycle-pause-on-hover="true"
data-cycle-swipe="true"
data-cycle-random="true"
data-cycle-fx="' . esc_attr( apply_filters( 'helena_get_option', 'featured_slider_transition_effect' ) ) . '"
data-cycle-speed="' . esc_attr( apply_filters( 'helena_get_option', 'featured_slider_transition_length' ) ) * 1000 . '"
data-cycle-timeout="' . esc_attr( apply_filters( 'helena_get_option', 'featured_slider_transition_delay' ) ) * 1000 . '"
data-cycle-loader="' . esc_attr( apply_filters( 'helena_get_option', 'featured_slider_image_loader' ) ) . '"
data-cycle-slides="> article"
>
<!-- prev/next links -->
<div class="cycle-prev"></div>
<div class="cycle-next"></div>
<!-- empty element for pager links -->
<div class="cycle-pager"></div>';
$select_slider = apply_filters( 'helena_get_option', 'featured_slider_type' );
// Select Slider
if ( 'demo-featured-slider' == $select_slider ) {
$output .= helena_demo_slider();
}
else if ( 'featured-post-slider' == $select_slider || 'featured-page-slider' == $select_slider || 'featured-category-slider' == $select_slider ) {
$output .= helena_post_page_category_slider();
}
elseif ( 'featured-image-slider' == $select_slider ) {
$output .= helena_image_slider();
}
$output .= '
</div><!-- .cycle-slideshow -->
</div><!-- .wrapper -->
</section><!-- #feature-slider -->';
set_transient( 'helena_featured_slider', $output, 86940 );
}
echo $output;
}
}
If this does not work, then I will need your site url. Let me know and I will email you to get the details for site url.
Regards,
Pratik