Number of Posts in Slideshow (index.php changed?)
  • TonyDTonyD February 17

    Hi there. I just checked my site speed and noticed that 4 featured images are showing up for the Scrollerota slideshow. I use a static image (just one post) in the slideshow, so the extra three images are unnecessary.

    So, I went into index.php to change the value, but things seem different now. Before the last theme update, I just changed '4' to '1' in:

    $posts = array(
    "posts_per_page"=>"4",
    "cat"=>$featuredcat,
    "ignore_sticky_posts" => 1
    );

    Now I see the following:

    $num = (pbt_theme_option('slideshow')==1) ? 4 : 5;
    $featuredcat = pbt_theme_option('fp_featured');
    $posts = array(
    "posts_per_page" => $num,
    "cat" => $featuredcat,
    "ignore_sticky_posts" => 1
    );

    Do I just change

    "posts_per_page" => $num,

    to:

    "posts_per_page" => "1",

    or should I be changing something else too?

    Sorry, not too clear, but hopefully it makes sense. Any advice would be appreciated, as the unnecessary extra three feature images are a bit of a speed bump.

    Cheers.

  • cbavotacbavota February 23

    That's exactly what you should be doing.

Hey there!

Take a look around, and if you would like to add a comment or start a discussion, register by clicking on the button below.

Register

Categories

In this Discussion

Tagged