July 5, 2014

Two Same Images Appearing In One Blog Post: How To Fix It


 As a WordPress user for some time now, creating a post in WordPress is a rather an easy process.

Bu then at times, I still do encounter some strange things, that I find it confusing.

The other day suddenly I found out some of my WordPress blog posts had two same images in it.

I only inserted one image and clicked on the featured image function. But two images appeared in one blog post.

fix two same images in one blog post wordpress

 Why Featured Two Images WordPress Posts


From my own experience for a featured image to appear twice in WordPress posts, is because you set a featured image and also insert it into the post content.

When you set a featured image, you expect it to appear in your visual post editor, right?

But when it does not appear in the visual post editor, you insert the same image again in the post.

So you thought everything is find now.

You can see the image in the visual post editor.

Now the problem arises...

Then when you publish the post, you notice that the image is appearing TWICE on their post.

Oh Gawd! What's happened?

For those who know and have already experienced this two-image problem, it can be easily fixed.

In this article, I will show you how to fix featured images appearing twice in WordPress posts.

After reading through some forums and blog posts, I found a way to fix this annoying problem.

 Fix Two Same Images  One Blog Post WordPress


This is what I do:

1. Go to content.php

2. Look for this code or something similar:

<?php the_post_thumbnail(); ?>

3. You just comment it out. It means hide it from the browser.

4. This is what you do. Add two slashes  // before the_post_thumbnail.

5. It looks like this: 

<?php // the_post_thumbnail(); ?>

6. Or you can do it this way:

 <!-- <?php the_post_thumbnail(); ?> -->

7. Warning: DO NOT click on Set featured image link!

8. Click Update File.

9. That's all.


Written by: Kher Cheng Guan