i am not skilled in php, so maybe i am overlooking something simple/stupid.
But the following code only seems to loop 5 times (atleast it only outputs 5 sites) While this specific category has 12 sites in it for example.
Am i doing something wrong?
<div class="col-md-3"> <div class="maddos-category-container"> <div class="maddos-category-header"><h3 class="maddos-category-header-title"><a href="<?php echo get_category_link( "17" );?>"><?php echo get_cat_name(17);?></a></h3></div> <div class="maddos-category-wrapper"> <ol> <?php $args = array( 'category' => 17, 'post_type' => 'post' ); $postslist = get_posts( $args ); foreach ($postslist as $post) : setup_postdata($post); ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endforeach; ?> </div></div></div> </ol>
die(count($postslist))orvar_dump($postslist)would be a good place to start. What does the declaration forget_postsfunction look like? My guess is one of the arguments is$limit = 5.