Title: get_permalink not working correctly
Last modified: August 21, 2016

---

# get_permalink not working correctly

 *  [Pete](https://wordpress.org/support/users/peezey01/)
 * (@peezey01)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/get_permalink-not-working-correctly/)
 * I am using the following code on my page ([http://datingshakeup.com](http://datingshakeup.com))
 * `<a href="<?php echo get_permalink($post->ID); ?>">( <fb:comments-count href="
   <?php echo get_permalink($post->ID); ?>"></fb:comments-count> Comments )</a>`
 * to try to add a link to the single post page at the end of each post, and to 
   display the number of comments each post has (using a Facebook plugin).
 * At the moment the code `<?php echo get_permalink($post->ID); ?>` is returning
   the same url ‘[http://datingshakeup.com/on-commitment-and-casual-sex/&#8217](http://datingshakeup.com/on-commitment-and-casual-sex/&#8217);
   for each post. I would like it to get the return the url for each post individually.
   Any ideas?

The topic ‘get_permalink not working correctly’ is closed to new replies.

## Tags

 * [get_permalink](https://wordpress.org/support/topic-tag/get_permalink/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [Pete](https://wordpress.org/support/users/peezey01/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/get_permalink-not-working-correctly/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
