category slider broken

After the update the following code stopped working correctly. It’s shows 5 images and no slider.

<?php benelux_featured_slider(); ?>


function benelux_featured_slider() {
    echo '';
      echo '<ul>';

        $count = of_get_option( 'sparkling_slide_number' );
        $slidecat =of_get_option( 'sparkling_slide_categories' );

        $query = new WP_Query( array( 'cat' =>'230','posts_per_page' =>$count ) );
        if ($query->have_posts()) :
          while ($query->have_posts()) : $query->the_post();

          echo '<li><a href="'. get_permalink() .'">';
            if ( (function_exists( 'has_post_thumbnail' )) && ( has_post_thumbnail() ) ) :
              echo get_the_post_thumbnail();

              echo '';
                  if ( get_the_title() != '' ) echo ''. get_the_title().'';
                  if ( get_the_excerpt() != '' ) echo '' . get_the_excerpt() .'';
              echo '</div>';
              echo '</a></li>';

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

Hi @taro,

Sorry to hear of the problem you are having.

Your code is not shared correctly in the topic so could you please share it again on

Best Regards,

sorry: pasetbin slider code

Your shared slider code is old code so please use the following updated slider code.


Changing the function from function sparkling_featured_slider() { to function benelux_featured_slider() { and ‘cat’ => $slidecat, to ‘cat’ => ‘230’, did not work…

The page is loading correct but not showing the slider.

You have to also change the function call in the header.php file from benelux_featured_slider to sparkling_featured_slider.

If you don’t want to change function call then please change the shared function name from sparkling_featured_slider to benelux_featured_slider

that code is active in the header <?php benelux_featured_slider(); ?>

changing it both back to sparkling_featured_slider is not doing it. So it has to do with the cat

            $query = new WP_Query( array(
                'cat' => '230',
                'posts_per_page' => $count,
                'meta_query' => array(
                     'key' => '_thumbnail_id',
                     'compare' => 'EXISTS'
            ) );

Please share again the whole modified code that you are using.

functions.php code

header code
<?php benelux_featured_slider(); ?>

The shared code seems fine so i visited your shared site and found some required files are not loading in your site due to its incorrect path as shown in the attached screenshot.

Your child theme is trying to load the file on URL which is wrong and in the new theme version the file is located in the path

You have to change your child theme code to make it work with latest version of theme or just use older version of Sparkling theme that was working fine for you.

Thanks! I will try and update my files to the new child theme.

You are most welcome here :slight_smile:


Thanks for the warm welcome :slight_smile: !

I changed all the errors and updated some code but the slider is not showing.

Current header page

Current news page

Current function code

On your site you are not loading the flexslider js file /assets/js/vendor/flexslider.min.js from your child theme.

Could you please share me your whole child theme so that i can resolve the issue in it?


Please try using attached modified functions.php file in your child theme.

that did not work.

Would you mind if i log in to your site and do some troubleshooting? If this is ok then could you please share me your site log in details privately by checking the option “Set as private reply” when replying to this topic?

Hi, The slider of my Sparkling theme suddenly stopped working, it was fine few days before but now has completely stopped working.
My site is

@roamonurown The slider is working fine on your shared site as shown in the attached screenshot.

Please test it clearing your browser cache or using different browser.