I have a problem with my loop.php
, it keeps on repeating posts. I'm guessing this might be controlled outside of this loop.php
as it happens no matter what I try. Could someone please advise me as to where it might be getting this information to repeat the loop 4 times.
Here is the current loop.php
<?php
$args = array ( 'category' => 4, 'posts_per_page' => 10);
$myposts = get_posts( $args );
foreach( $myposts as $post ) : setup_postdata($post);
?>
<!-- Begin Style Here -->
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="postmeta">
<?php do_action('themezee_display_postmeta_index'); ?>
</div>
<h2 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<div class="entry">
<?php the_post_thumbnail('thumbnail', array('class' => 'alignleft')); ?>
<?php the_content('<span class="moretext">' . __('Read more', 'themezee_lang') . '</span>'); ?>
<div class="clear"></div>
<?php wp_link_pages(); ?>
</div>
<div class="postinfo">
<?php do_action('themezee_display_postinfo_index'); ?>
</div>
</div>
<!-- End Style Here -->
<?php endforeach; ?>
Thanks for any help with this