Hi,
Almost every post in my blog has a featured image. That is why they all show up as a slider on the first page.
Now I only want to show the latest e.g. 8 posts to show up as a slider on my first page.
How can I set this up?
Thanks in advance.
Nalys
You have to change the number of posts per page in the ‘loop-slider.php’ (code looks like this):
7,
and in functions.php (code looks like this – it’s near top)
function minimatica_paged_posts( $query ) {
if( (
( $query->is_home() && ‘gallery’ == minimatica_get_option( ‘homepage_view’ ) ) ||
( $query->is_category() && ‘gallery’ == minimatica_get_option( ‘category_view’ ) ) ||
( $query->is_tag() && ‘gallery’ == minimatica_get_option( ‘tag_view’ ) ) ||
( $query->is_author() && ‘gallery’ == minimatica_get_option( ‘author_view’ ) ) ||
( $query->is_archive() && ‘gallery’ == minimatica_get_option( ‘archive_view’ ) )
) && ( ! is_single() )
)
$query->set( ‘posts_per_page’, ‘7’ );
}
Then I’d recommend changing the slider width in style.css from 230px to something smaller so they’ll all fit on the page. If you don’t the slider will be huge and cut off the edge of the browser screen. I set mine with 7 posts to 150px (The code looks like this)
.kwicks .slide {
float:left;
display:block;
width:150px;
Hope that helps. It will default post the latest posts in the number you set (your case 8)