Slider not reflecting changes made

Sure here is the following original slider function code.


/**
 * Featured image slider, displayed on front page for static page and blog
 */
function activello_featured_slider() {
  if ( ( is_home() || is_front_page() ) && get_theme_mod( 'activello_featured_hide' ) == 1 ) {
		
		wp_enqueue_style( 'flexslider-css' );
		wp_enqueue_script( 'flexslider-js' );
		
    echo '';
      echo '<ul>';

        $slidecat = get_theme_mod( 'activello_featured_cat' );
        $slidelimit = get_theme_mod( 'activello_featured_limit', -1 );
        $slider_args = array( 
            'cat' => $slidecat,
            'posts_per_page' => $slidelimit,
            'meta_query' => array(
                array(
                 'key' => '_thumbnail_id',
                 'compare' => 'EXISTS'
                ),
            )
        );
        $query = new WP_Query( $slider_args );
        if ($query->have_posts()) :
          while ($query->have_posts()) : $query->the_post();
                
            if ( (function_exists( 'has_post_thumbnail' )) && ( has_post_thumbnail() ) ) :

                echo '<li>';
                      echo get_the_post_thumbnail( get_the_ID(), 'activello-slider' );

                    echo '';
                      echo get_the_category_list();
                        if ( get_the_title() != '' ) echo '<a href="' . get_permalink() . '">'. get_the_title().'</a>';
                        echo '<a href="' . get_permalink() . '">' . __( 'Read More', 'activello' ) .'</a>';
                    echo '</div>';

                echo '</li>';
            endif;

        endwhile; 
        wp_reset_query();
        endif;

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

HI Movin,

Slider all fixed. So I had put back the original slider codes and made sure ‘Travel’ Category only contained posts I want to show on slider. Thanks for you help.

Qi

Hi Qi,

Glad we helped. :slight_smile:

Let us know if you have any other questions in a separate thread.

Thanks,
laranz.