Title: get_permalink() function not returning permalink displayed in post creation
Last modified: October 18, 2016

---

# get_permalink() function not returning permalink displayed in post creation

 *  [hyperchema](https://wordpress.org/support/users/hyperchema/)
 * (@hyperchema)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/get_permalink-function-not-returning-permalink-displayed-in-post-creation/)
 * I have a custom post type that has successfully been using pretty permalinks 
   for a while now. However, after this last update some of my new posts no longer
   display the correct permalink when I call the get_permalink() function. If I 
   go into the post editor, I see that the correct permalink is there such as [http://www.site.com/events/full-event-name](http://www.site.com/events/full-event-name).
   But the get_permalink() function returns a [http://www.site.com/?post_type=events&p=34478](http://www.site.com/?post_type=events&p=34478).
   I have been looking all over for why this is happening. I’ve tried deleting the
   posts and adding them back, adding rewrite flushes all over but every time the
   new posts end up with the bad permalink. What’s more, since the bad permalink
   isn’t accurate, no one can now use those links

The topic ‘get_permalink() function not returning permalink displayed in post creation’
is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [hyperchema](https://wordpress.org/support/users/hyperchema/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/get_permalink-function-not-returning-permalink-displayed-in-post-creation/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
