Menu Close

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

  1. Vaseem Ansari

    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

  2. Text to Speech(TTS)API

    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

  3. Vijay

    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.

  4. Johnson

    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.

  5. Gopinath

    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.

Leave a Reply to Tim Cancel reply

%d bloggers like this: