wordpress loop adding junk

I’m having an issue with loops in WordPress – code is being added on and repeated with the loop…

This is the code:

Read More
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

<?php get_template_part( 'partials/loop', 'page' ); ?>

<?php $the_query = new WP_Query( 'showposts=3' ); ?>

<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
<?php the_post_thumbnail( array(100,100) );?>

<h4><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h4>
<?php echo strip_tags(get_the_excerpt()) ?> 

    

<?php endwhile; else : ?>

<?php get_template_part( 'partials/content', 'missing' ); ?>

<?php endif; ?> 

The output:

<img width="100" height="100" src="http://blahblah/glasses-150x150.png" class="attachment-100x100 wp-post-image" alt="glasses">
<h4><a href="http://blahblah/titleofpost/">Title of Post</a></h4>
The Excerpt of the post, blah blah blah  Read more » 

&nbsp;&nbsp;&nbsp;&nbsp

I have no idea where the & nbsp; code at the end is coming from – any help appreciated 🙂

is coming from

Related posts

Leave a Reply

1 comment

  1. Does it happen in each post in the loop ?

    Otherwise I think you should double check your html tab in your articles editing admin panel. The tinyMCE plugin often add some &nbsp; (non-breaking space character) when you hit enter to begin another line.