If you need to edit your WordPress posts/pages frequently or if you want to edit comments directly from the blog page, then you might consider adding Edit link to your post, page and comments template. This is one of the best WordPress management productivity tip as you can simply click on the edit link and go to the respective edit screen for post, page or comment. This will save you a lot of time in managing your WordPress website(s).
To add Edit link on individual posts or pages, simply place the code below, on the post and page template in your WordPress file.
Please make sure that you place the code inside the loop.
Also note that the post or page template is usually post.php and page.php respectively. However you may need to edit index.php depending upon the way your WordPress theme is coded. You can see WordPress template hierarchy to find out the correct template file to edit.
To add Edit link in individual comments, place the following code in comments loop inside the comments template file (comments.php) of your theme,
That’s it. You also need not worry about your theme’s aesthetics while adding these Edit links because they will be displayed only if you are logged in with admin or editor privileges. General visitors will not see them.