post edit button on front end

If you are logged-in and switch to the front-end the default WordPress theme Twenty Eleven provides edit buttons next to every post.

Pressing this button you get to the certain post’s back-end post edit page.

Read More

How to implement this into a custom template?

Related posts

1 comment

  1. The function is edit_post_link() (see Codex or source). In TwentyEleven it used as follows in content.php

    edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' );
    

    You can simply use the function as indicated above (or in the Codex) in a custom template, but it must be used inside the loop. There’s no need to perform any permission checks.

Comments are closed.