How to Save Time when you Edit WordPress Posts and Comments
Have you ever made a mistake in your wordpress posts and realized it once it was posted. I know I have, and I am sure that every blogger has made this mistake more than once. What about if the post you made a mistake on was not your recent post. It was something that you wrote about 4 months ago. Your user reported a typo or some sort of error. Well then you waste your time going to view all of your posts and find this specific one. Then edit it.
Well what if I tell you that you just have to add an edit code in your wordpress themes and you will just have to click edit and you can edit that post. Well most smart themes come with this code already embedded, but for those starters who are wondering how you do something like this. It is very easy.
To add an edit code in your posts, simply open your single.php and add this code at the desire place:
<?php edit_post_link(__("| Edit |"), ”); ?>
Not just posts, you can do this with comments as well. I am using Brian’s Threaded Comment, that already have this code in it. But if you still are wondering what are the codes, copy and paste the following codes into your comments.php
<?php edit_comment_link(__("| Edit |"), ”); ?>
You see how simple these are. O and you might be wondering my whole audience will see these buttons. No they will not. Only administrators, and authors will see this tag, and no one else.





















Hey, I am Syed Balkhi, The guy who is behind Balkhis Inc. I entered the industry back in 2002 not knowing a single thing. I barely spoke English at that time. In the past six years, my language barrier has been eliminated. Aside from English, now I also speak html, and php. Along with the languages I have also managed to master a few arts. Art of web-designing started when I first entered. Messing around with photoshop, I learned how to create my first web design. Now I founded a web designing firm Uzzz Productions. After running numerous amount of websites in various niche, I have mastered the art of web-development. Now I am compiling a resource of what I already know, and what I am learning on this blog. This resource is to help me if I ever need a guide to look back to, and it is help my fellow webmasters.




I had no idea a code like this existed in the theme. I’m pretty sure that this will save me so much time in the event that I make a typo or mistake of some sort. Thank you for sharing this, Syed!
I need to spend some time and install threaded comments, but it looks tricky
My theme already comes with an edit button. It even has an edit button for comments. Handy sometimes.
There have been a lot of instances when there was a problem with the post and luckily for me, the problem was detected soon after i published the post. They were minor errors but i used to waste a lot of time doing that. Now, since the code is here, I ll surely try to put that code and experience the ease and convenience of the edit code…
few blogs of mine had this code already embedded in the theme m using … but few didnt …
now having the code from here .. will have an ease to edit older posts …
Wow, I didn’t know that you can do that for comments too. Thanks.
Editing buttons are really cool because there always are mistakes in posts…
I’ve already modified my theme to support threaded comment. Kind of a nightmare to modify, but I love the threaded comments!
When I designed my Blog’s theme I took a lot of help from the default theme which has this kind of stuff, so it does make it a lot more easier!
This is great info, I never knew you can add code to edit your post. Thanks for sharing it
thanks balkhis… my new themes do not support this edit link, i`m created it and sucsess for me…