Slider checkbox - how to enable slider for Sparkling theme

Hello. Is there a possibility to make slider work after using checkbox in post page instead of using selected category?

Thanks in advance!

Could you please explain what do you mean by that?

Slider will appear on frontpage (blog or static page depending on your website configuration). Slider will use posts from selected category and images used in slider are featured images that you have select for those posts.

I`m trying to make it work not from category. I need to use checkbox on edit post page.

I install ACF Plugin, and make new custom field slider_checkbox, edit code a bit, but it still not working.

if ( ! function_exists( 'sparkling_featured_slider' ) ) :
/**
 * Featured image slider, displayed on front page for static page and blog
 */
function sparkling_featured_slider() {
  if ( is_front_page() && of_get_option( 'sparkling_slider_checkbox' ) == 1 ) {
    echo '<div class="flexslider">';
      echo '<ul class="slides">';

	$count = of_get_option( 'sparkling_slide_number' );
	$args = array(
	'posts_per_page' =>$count,
	'post_type'=> 'post',
	'meta_query' => array( 
		array(
			'key' => 'slider_checkbox',
			'value' => '1'
		) ) );

        $query = new WP_Query( $args );
        if ($query->have_posts()) :
          while ($query->have_posts()) : $query->the_post();

          echo '<li>';
            if ( (function_exists( 'has_post_thumbnail' )) && ( has_post_thumbnail() ) ) :
              echo get_the_post_thumbnail();
            endif;

              echo '<div class="flex-caption">';
                echo '<a href="'. get_permalink() .'">';
                  if ( get_the_title() != '' ) echo '<div class="slider-title">'. get_the_title().'</div>';
                  if ( get_the_excerpt() != '' ) echo '<div class="excerpt">' . get_the_excerpt() .'</div>';
                echo '</a>';
              echo '</div>';

              endwhile;
            endif;

          echo '</li>';
      echo '</ul>';
    echo ' </div>';
  }
}
endif;

I think the problem is in ACF. But maybe you see something differnt.

Thank in advance!