Remove a certain category from slider

Hi! I am using the Activello theme and I know it is possible to show just one category in the slider, but instead I would like to hide such specific category. Would this be possible?

Thank you in advance!

Hi @elbauldelapsique,

I hope you are well today and thank you for your question.

You can try achieving this by using the attached custom child theme of Activello theme that contains some custom code.

The attached child theme contains following code in the functions.php file of it so just edit the category name ‘blog’ in that code with the category name that you want to hide from slider.

function custom_the_category_list($categories){
    if ( !empty( $categories ) ) {

        foreach ( $categories as $key => $category ) {
            if( $category->name == 'blog' ){
                unset($categories[$key]);
            }
        }
    }
    return   $categories;
}

Best Regards,
Movin

It worked wonderfully! Thank you very much! :slight_smile:

You are most welcome here :slight_smile: