This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 11 replies, has 3 voices.

Last updated by Vinicio 7 years ago.

Assigned support staff: sarah.n.

Author Posts
October 2, 2012 at 8:38 am #77881


We've updated WPML to version 2.6 and we have big problems with our websites because articles are shown doubled in the frontend. We've tried deactivating WPML and everything is OK.
You can see the problem here: hidden link
and here: hidden link
We're using WordPress 3.4.2.
Thank you in advance for your help!

October 2, 2012 at 8:59 am #77885


I have exactly the same problem, and have tested all plugins and themes: the problem is WPML.

Example: any post of hidden link

October 2, 2012 at 9:08 am #77887


Languages: English (English ) German (Deutsch )

Hello Vinicio, Pierre,

In both cases we need to take look at the code (NOT page source code but template php code!) that outputs the content on the pages that have the duplicate content issue.

May I ask both of you please to copy and paste the single.php code?

Vinicio, you will also need to copy and paste the code that outputs the front page content.

P.S Please make sure that you use the latest version of everything; WordPress WPML and add-ons and of your theme!

October 2, 2012 at 9:31 am #77898


This is the index.php:

And this one is the single.php:

Everything is updated to the latest version.

October 2, 2012 at 9:52 am #77905


Languages: English (English ) German (Deutsch )


Thank you for this.

I will first address the single.php template. Please make a back-up of your file first before you make the following edits.

Delete or comment out lines 10 & 11 with the following:

 <?php if ( have_posts() ) : $count = 0; ?>
 <?php while ( have_posts() ) : the_post(); $count++; ?>

Delete or comment out lines 91 -96 with the following:

<?php endwhile; else: ?>
<div class="post not-found">
<h2 class="title"><?php _e( 'Error 404 - Page not found!', 'woothemes' ); ?></h2>
<p><?php _e( 'The page you trying to reach does not exist, or has been moved. Please use the menus or the search box to find what you are looking for.', 'woothemes' ); ?></p>
</div><!-- /.post -->
<?php endif; ?>

Upload the modified single.php and let me know if that makes a differense.

October 2, 2012 at 9:58 am #77907


Yes, it works!

Thank you

October 2, 2012 at 10:01 am #77909


Languages: English (English ) German (Deutsch )

OK this is good news 🙂

Now for the front page. Looking at the page source code could it be that the template used is the page.php rather than the index.php?

If you are using a static front page then WordPress will send page.php to the browser. Is this the case with you? If so, could you please provide the page.php code in pastebin?


October 2, 2012 at 10:08 am #77910


Here there's page.php:


October 2, 2012 at 10:33 am #77916


Languages: English (English ) German (Deutsch )

Thank you Vinicio.

I have a feeling that the function:


uses a loop. Could you paste the function in pastebin for me?

If I'm right, then this is what throws the page loop off which comes below the slider.

while (have_posts()) : the_post(); ?>

We may have to replace it with something like

$my_query = new WP_Query('$args');

- Referense info:

Let's not be too quick with editing code though. Can you please first send me the homePageFullWidthSlider() function?

October 2, 2012 at 10:56 am #77925


homePageFullWidthSlider() function:

Thank you!

October 2, 2012 at 11:23 am #77933


Languages: English (English ) German (Deutsch )


Thank you for this. Can you please try the following. Add:


At the end of each while loop in the homePageFullWidthSlider() function.

This will be on line 63 and on line 103 like this:

} wp_reset_query();

If that does not make any differense we will try something else.

Again, be sure to back-up the original file before you modify it.

October 2, 2012 at 12:32 pm #77947


It works!

Thank you!!!

The topic ‘[Closed] Error: Duplicated posts in frontend’ is closed to new replies.