Adding The Edit Function To Your Posts.
A simple but yet useful function not found in many WordPress Themes is the “edit” function. I don’t know why , but even some of the best theme designers find it unnecessary to include this little piece of code in their themes.
The tiny “edit” button is found normally at the title bar or at the footer bar of every post and is only visible to the administrator. It allows the author to quickly make changes to the post if he detects some wrong spellings or something that doesn’t appear right in the post after hitting the publish button. Without that, they will have to go back to their dashboard all over again to access that post before they can edit it.
If your theme doesn’t comes with one, adding it yourself is not too difficult. It just a matter of inserting a single line of code to your Main Index and the Single Post File. Copy this line of codes entirely:
<?php edit_post_link(‘Edit’, ‘ | ‘, ”); ?>
To place it in your post title bar, look for the <div class= “post-meta-top”> tag in your Main Index php and paste it like the example below. Different themes might be written a little bit differently, but it will be more or less the same. Do the same thing for your Single Post php.
<div class=”auth”><span>Posted by <strong><?php the_author_posts_link(); ?><?php edit_post_link(‘Edit’, ‘ | ‘, ”); ?></strong></span></div>
The “edit” link will appear next to “Posted by XXX” in your post’s title bar.
Warning: As in tinkering with any codes in your templates, make sure to backup the whole file first. Just go to your Main Index php – right click-select all. Open your Notepad and paste the entire original file there. If you screw up, just copy the original files from your notepad, go back to your Main Index-right click-select all and paste back the original file. So keep experimenting until you are satisfied as to where you want the “edit” link to appear.
Other Awesome Articles
- Adding Thumbnails To WordPress 3 Default Theme
- How To Edit The 7 Dollar Script – Squeeze Page
- Latest WordPress Template – BlueSensation WordPress Theme
- How To Edit The 7 Dollar Scipt – Download Page
- Customizing Your First WordPress Theme
- Step by Step to Adding a Sitemap in Google
- Use the Search Function to Look for the Post you want to Interlink.
- Adding Some Stylish Functions To The K9 Theme
5 Responses to “Adding The Edit Function To Your Posts.”
Comments
Read below or add a comment...
Trackbacks
-
[...] align” function. Those who wants to add in these functions can check out my previous posts, Adding The Edit Function To Your Post and Aligning Images With Your Stylesheet Details, Download and Preview The StudioPress WordPress [...]
-
[...] feature missing in many themes that have “qualified” the top two criteria is the “edit post” function. I said many times before that I find it rather surprising that many top class theme developers [...]

If you enjoyed this post, whether it's awesome or lame, consider leaving a comment or 









This is a handy hint. I have bookmarked it for future reference. Thanks
Thanks for this info, but do you know what I need to do so that the edit doesn’t look like “edit”
You can of course replace the word Edit within the quotation marks to any word you like. Some simply use the letter “e”
Anyway, the word or whatever letter you use is only visible to you and no one else and even then, you have to be logged in to see and use the Edit function. So how it looks doesn’t really matter much.