home – counts of posts
-
hi,
first off all, my english isn’t so good but i’ll try my best.
i’ve tried to make a bootstrap html theme to a wordpress theme, without good php and wordpress skills (i used a videotraining by v2b), and it works well so far. There is just one thing i can’t change.. in the middle of my home.php i embedded posts from category 1. i want that there are just 3 posts or 6 posts, but wordpress shows only 5. I placed 6 posts (published) in category 1.
and here’s the code
<div class="row"> <?php $posts = get_posts('category=1'); foreach ( $posts as $post ) : setup_postdata( $post ); ?> <div class="col-md-4"> <div class="templatemo-service-item"> <div><div class="meta-nu">Geschrieben von: <span class="txt_orange"><?php the_author_link();?></span> am <?php the_date(); ?></div> <?php if ( has_post_thumbnail() ){ $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id(), 'thumbnail');?> <img src="<?=$thumbnail[0];?>" alt="icon" /> <?php } ?> <span class="templatemo-service-item-header"><?php the_title();?></span> </div> <p><?php the_excerpt();?></p> <div class="text-center"> <a href="<?php the_permalink();?>" class="templatemo-btn-read-more btn btn-orange" role="button">weiterlesen »</a> </div> <br class="clearfix"/> </div> <div class="clearfix"></div> </div> <?php endforeach; wp_reset_postdata(); ?> </div>
hope anyone can help… regards
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘home – counts of posts’ is closed to new replies.