Title: Facebook Comments / Same Comments Every Post
Last modified: August 20, 2016

---

# Facebook Comments / Same Comments Every Post

 *  [chrislawhorn](https://wordpress.org/support/users/chrislawhorn/)
 * (@chrislawhorn)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/facebook-comments-same-comments-every-post/)
 * I’ve got Facebook Comments enabled on my site, but it puts the same comments 
   on every post.
 * I think I know where the issue is. I just don’t know how to resolve it.
 * Basically, this is the code for the comment section, as I’m using it:
 * <fb:comments href=”<?php the_permalink(); ?>” xid=”<?php the_ID(); ?>” width=”
   572″></fb:comments>
 * In theory, it should populate the permalink section above with the page of the
   site the comment’s being left on.
 * But, if you look at this post…
 * [http://www.runhundred.com/workout-music/snoop-dogg-wiz-khalifa-bruno-mars-young-wild-free-96-bpm/](http://www.runhundred.com/workout-music/snoop-dogg-wiz-khalifa-bruno-mars-young-wild-free-96-bpm/)
 * …then look at the page source in a browser, you’ll see that the permalink that
   shows up next to fb:comments is this one:
 * [http://www.runhundred.com/workout-music/dj-merritt-blake-potter-stick-of-sin-132-bpm/](http://www.runhundred.com/workout-music/dj-merritt-blake-potter-stick-of-sin-132-bpm/)
 * So, I guess my question is this: Why is the site pulling up the latter permalink,
   not the one of the post being viewed?
 * Any ideas would be appreciated.
 * Thanks.

Viewing 1 replies (of 1 total)

 *  Thread Starter [chrislawhorn](https://wordpress.org/support/users/chrislawhorn/)
 * (@chrislawhorn)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/facebook-comments-same-comments-every-post/#post-2345379)
 * I figured this out…
 * The problem was that, right above the Facebook Comment code I had a “Recent Posts”
   section that I’d created using this:
 * [http://codex.wordpress.org/Function_Reference/query_posts](http://codex.wordpress.org/Function_Reference/query_posts)
 * But, as it points out on that page, using query_posts will “alter the main loop.
   Once you use query_posts(), your post-related global variables and template tags
   will be altered.”
 * To that end, it was populating Facebook Comments with the last song in the Recent
   Songs section, instead of the url of the post the comment section appeared on.
 * Changing the query_posts to this fixed the problem:
 * [http://codex.wordpress.org/Function_Reference/get_posts](http://codex.wordpress.org/Function_Reference/get_posts)

Viewing 1 replies (of 1 total)

The topic ‘Facebook Comments / Same Comments Every Post’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [chrislawhorn](https://wordpress.org/support/users/chrislawhorn/)
 * Last activity: [14 years, 7 months ago](https://wordpress.org/support/topic/facebook-comments-same-comments-every-post/#post-2345379)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
