Tech Dreams

Add “Edit This Post” Link To Blog Posts To Quickly Edit Them [WordPress]

wordpress_logo While going through the articles on my blog, I often find the necessity to improve the quality of content or optimize the post for search engines. To edit the post I need to login to WordPress, search the post and click on the edit link. This is a time consuming process. Will it not be handy if I’ve a link on every post that takes me to directly post edit page? Yes, it is.

A simple WordPress theme modification added this very handy feature to my blog. Now I’ can go to edit page of every post by just click on the link “Edit this post” as shown in the below image

 Edit_this_post_link

To display a link to edit the current post, if a user is logged in and allowed to edit the post add this following code to WordPress template


<?php edit_post_link(‘Edit this post’, ”, ”); ?>


If you are a WordPress newbie, you might be wondering to which files of theme we have to add this piece of code. For displaying the link in individual post pages add this code to single.php file. If you want to have this link on home page then you should add it to index.php file.

Need more instructions? Drop a comment or fill the contact form, I’ll be glad to assist you.

11 Comments on Add “Edit This Post” Link To Blog Posts To Quickly Edit Them [WordPress]

  1. Laura-Jane
    December 26, 2010 at 2:59 am (9 years ago)

    Thanks, this “post” code does work for the “pages”, too.

    Reply
  2. Vaseem Ansari
    November 1, 2010 at 6:01 pm (9 years ago)

    This is really good and default function of wordpress and everybody know about it, can u tell me a custom function that will show edit post link while we want to use that link outside the loop

    Reply
  3. composite door shop
    October 30, 2009 at 8:51 pm (10 years ago)

    great! any help with wordpress is greatly received

    Reply
  4. Text to Speech(TTS)API
    July 18, 2009 at 6:30 pm (10 years ago)

    both blog themes have this Edit link for every post (only for authors). So I assumed that this is a defaut feature for all wordpress themes
    htt://www.ispeech.org/api

    Reply
  5. mushtaq
    July 14, 2009 at 3:00 pm (10 years ago)

    thanks a lot.
    was searching for the same and found it on time.
    :)

    Reply
  6. Tim
    April 7, 2009 at 12:12 pm (10 years ago)

    Thanks for the advice, greatly appreciated.

    Reply
  7. Vijay
    March 6, 2009 at 2:39 pm (10 years ago)

    If it is only for blog author, then it is fine.

    I use this Edit link so often. It is very helpful.

    So far, I have used two blog themes; both blog themes have this Edit link for every post (only for authors). So I assumed that this is a defaut feature for all wordpress themes.

    Edit link for every post would save blog authro’s time.

    Reply
  8. Johnson
    March 4, 2009 at 11:31 am (10 years ago)

    Its easy to blogger to update a posting.
    have anyone idea regarding how to put a previous blog posting link automatically (Template code) add when i am making a new posting.

    Reply
  9. Pushpinder
    March 3, 2009 at 7:13 pm (10 years ago)

    good one… I will surely try…

    Reply
  10. Vijay
    March 2, 2009 at 5:18 pm (10 years ago)

    But, wouldn’t it annoy the reader?

    Reply
  11. Gopinath
    March 2, 2009 at 5:28 pm (10 years ago)

    Vijay,
    This link is visible to blog authors. That too only if they are logged into WordPress admin. Regular blog visitors never get a chance to see this link.

    Reply

Leave a reply to Pushpinder

Click here to cancel reply.