Title: edit_post_link Problem
Last modified: August 19, 2016

---

# edit_post_link Problem

 *  [Ali Hussain](https://wordpress.org/support/users/b4db0y/)
 * (@b4db0y)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/edit_post_link-problem/)
 * Hi,
    I have a blog based on WordPress 3.1.1 I have a theme that uses custom post
   types and has around 1k posts equally shared by regular posts and custom post
   types.
 * Now when i am on a post and try to edit the post using “edit_post_link” feature
   the error comes in.
 * Example i am trying to edit a post with id 7738 and the edit links to the post
   id 1231.
 * I hope i am able to explain the problem.
    Would like some help

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/edit_post_link-problem/#post-2058432)
 * link to your site?
 * do you have any ‘related posts’ code after the main post content – before the‘
   edit post link’?
 *  Thread Starter [Ali Hussain](https://wordpress.org/support/users/b4db0y/)
 * (@b4db0y)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/edit_post_link-problem/#post-2058620)
 * [@alchymyth](https://wordpress.org/support/users/alchymyth/)
    Yes, related posts
   do exist.
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/edit_post_link-problem/#post-2058621)
 * if you check, you will probably see that the ‘edit post link’ opens the last 
   post in the related posts list.
 * the ‘related posts’ code is probably not programmed to keep the original $post
   object or query_string;
 * – if this is done with a plugin, look for a different one, or contact the plugin
   author to fix it.
 * if this is within you theme, can you post the code of the related posts section?
   (
   please use the [http://pastebin.com/](http://pastebin.com/) for any code longer
   than 10 lines)
 *  Thread Starter [Ali Hussain](https://wordpress.org/support/users/b4db0y/)
 * (@b4db0y)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/edit_post_link-problem/#post-2058622)
 * I used the reset_query before the edit link and it seems to be working just fine.
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/edit_post_link-problem/#post-2058623)
 * that’s it – well done 😉
 * please mark this as ‘resolved’ if you don’t have any further questions – thanks

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘edit_post_link Problem’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/alchymyth/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/edit_post_link-problem/#post-2058623)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
