Balkhis - Vision For Success

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.



To stay updated with the blog, please consider subscribing to my full feed RSS. You can also subscribe by Email and have new posts sent directly to your inbox. I hate spam as well, so I promise you that you will not be spammed.
Add to Social Bookmarks:
Add this Article to Digg Add this Article to Stumbleupon Add this Article to Del.icio.us Add this Article to Reddit Add this Article to Newsvine Add this Article to Technorati

RSS feed | Trackback URI

10 Comments »

Comment by MLRebecca
2008-11-07 17:18:02

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!


 
Comment by Simon
2008-11-07 19:03:08

I need to spend some time and install threaded comments, but it looks tricky :(


 
Comment by Ganesh
2008-11-07 22:06:34

My theme already comes with an edit button. It even has an edit button for comments. Handy sometimes. :)


 
2008-11-08 00:31:44

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…


 
Comment by Puneet
2008-11-08 01:01:38

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 …


 
Comment by webkinz Subscribed to comments via email
2008-11-08 02:35:32

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…


 
Comment by Michael Aulia
2008-11-08 04:24:47

I’ve already modified my theme to support threaded comment. Kind of a nightmare to modify, but I love the threaded comments! :)


 
Comment by Abdul
2008-11-08 14:13:32

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!


 
Comment by Zurpit
2008-11-08 21:13:11

This is great info, I never knew you can add code to edit your post. Thanks for sharing it


 
Comment by mancai
2008-12-07 04:09:19

thanks balkhis… my new themes do not support this edit link, i`m created it and sucsess for me…


 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.
Subscribe to Balkhis via RSS
Subscribe to Balkhis via Email Pimp My Blog