Support » Developing with WordPress » edit_post_link() taking to list of posts, not actual post

  • Resolved astatine85

    (@astatine85)


    When clicking on the link, it’s taking to the window which lists all posts, not the actual post itself.

    According to this, problems can happen if:

    _edit_link was changed during post type registration.

    But I haven’t done that anywhere. Searching for ‘edit_link’ doesn’t turn up anything in any files of the theme. What could be wrong? Thanks a lot.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Ok found the damn bug.

    The url was printing & as & which was the cause of the problem.

    Fixed:

    echo rawurldecode(get_edit_post_link( ));

    • This reply was modified 1 year, 5 months ago by astatine85.
    • This reply was modified 1 year, 5 months ago by astatine85.
    • This reply was modified 1 year, 5 months ago by bcworkz. Reason: Fixed HTML entity glitch

    Looks like even this editor can’t properly print amps

    Moderator bcworkz

    (@bcworkz)

    Indeed. You have to HTML entity the HTML entity. I fixed your solution post to read as you intended (I believe). Lets see if I can properly represent what to place in the editor without the forum parser corrupting it.

    Enter in the editor like so: `&`

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘edit_post_link() taking to list of posts, not actual post’ is closed to new replies.