Number of posts in home page's slider

I chose to put a slider on my home page several months ago.
Before, the number of posts in the slider was limited.
Since today I have a huge number of posts in my slider. I don’t know what I changed, but I think it’s too much, it was better when it was limited.
May I ask for you some help?
My website is:
Thank you very much!

In the appearance’s editor, inc/extras.php, I changed “-1” by “4” and it works. But maybe it would be better to put an option in the customisation part of the theme?
Thank you!

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 '<div class="flexslider">';
  echo '<ul class="slides">';

    $slidecat = get_theme_mod( 'activello_featured_cat' );

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

Hi @smouick,

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

In the latest version of theme we have removed the slider posts restriction so it displays all the slider posts having slider category.

You can control which posts to display in the slider by adding or removing slider category from the posts.

Best Regards,

Hello Movin,

Thank you for your answer.
Yes I’m aware of that solution but it’s not adequate for me. If I create a category with only the posts I want in the slider, the name of that category will be written everywhere (in the slider itself, in the post’s page).

Best regards!

We can hide that slider category from other places by developing custom CSS code if you share me your site URL and tell me the name of that category.

I have the same problem - i would like to limit the number of slider posts without the slider category being visible on the website. Can you, please, develop the same custom code for me too? the website is, slider category would be called “Slider”
(sorry for posting in someone elses thread, but I have the exact same problem, so I thought it would be more efficient)

@makeupjana The slider category must be visible on your shared site so that i can provide you the CSS solution to hide it.

Hello! Thank you for your reply! I have made the category “Slider” now visible on my blog Could you please help me to develop that custom code to make it invisible and only for internal slider use? Thanks a lot!

Best regards,

You can try achieving this by adding the following CSS code in the Custom CSS option of your theme on the below path.

Admin Area -> Appearance -> Customize -> Activello Options -> Other -> Custom CSS

.cat-item-116 {
    display: none;
.flex-caption .post-categories li:last-child {
    display: none;

Hello! Thanks a lot! It took me a while to do it, but it works! Thanks! :slight_smile:

You are most welcome here :slight_smile: