Topic: "Duplicate Posts" in Home / Sidebar
There is an issue reported by many users stating that they have "duplicate posts" appearing in their home page, and their sidebars. These posts are linked to the correct post URL, but are displaying the wrong information.
I've been finding the source of this issue for days, and have looked for many workarounds for this issue, and have roughly found the answer.
I have realised this issue happens when you have some plugins like Sociable activated with the theme, and with the option to display those links on the front page. Basically, this line is the culprit:
$post = $wp_query->post;What does this do? It sets the global $post variable to the main query's current post.
While this is harmless against most blog themes which has only one or two main queries, it is not when it comes to Arras. Arras uses multiple custom loops to power the featured posts and the sidebar widgets.
A solution to the issue is not to reference $post from $wp_query->post, but to reference the global $post variable instead.
In the case of the Sociable plugin, all you need to do is to comment that line.
I'm not sure about other plugins that cause this issue, but I think it would be good if we keep record of those in this topic. Hopefully, we could post the appropriate code fixes for individual plugins here as well.
Also, if you really wish to use the plugin with Arras, it's good that you give a heads up to the authors of the affected plugins. ![]()
Meanwhile, I will continue to find workarounds for this issue on future releases.
Thanks in advance!
Credits to the following forum topics in WordPress.org:
http://wordpress.org/support/topic/soci … tpost-flaw
http://wordpress.org/support/topic/soci … oop-themes