Including an Edit Link on the WordPress Front End

As you have probably seen, many themes have an Edit link visible on posts or pages when viewing them on the front end, provided you are logged in to the site with editing rights. When designing your own theme it is probably a good idea to implement this feature, especially for sites which will have alot of content. The simple reason is that it is much easier to find a page from the front end than from the back end, thus you will make life easier for the site administrators.

Use the following code in your template:

<?php edit_post_link(__('<span>{Quick Edit}</span>'), ''); ?>

I also like to put a style:

.admin-edit { color: green; }

Related posts:

  1. How to Add a Quick Edit Button on WordPress Posts and Pages
  2. Using PHP Heredoc in a WordPress Theme
  3. Tennis Courts in Malta
  4. Best WordPress Plugin for Including Video in Posts/Pages
  5. WordPress 3 Front End Editing Plugin

Leave a Comment

Let us know your thoughts on this post but remember to place nicely folks!