• 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)
  • 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

    (@b4db0y)

    @alchymyth
    Yes, related posts do exist.

    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/ for any code longer than 10 lines)

    Thread Starter Ali Hussain

    (@b4db0y)

    I used the reset_query before the edit link and it seems to be working just fine.

    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.