Have you ever made a mistake in your old WordPress posts and realized it when your user emailed you 4 months later? If you have, then you would normally have to go through the WordPress admin panel, search that post and edit it. This obviously takes a lot of time which can be saved by a Quick Edit link in each post page. Majority of the top themes have this included, but there are still theme designers that fail to include this simple feature in a theme. In this article, we will show you how you can add a quick edit button in your WordPress posts and comments.
Adding a Quick Edit Button to WordPress Posts
Simply open your theme’s single.php file and add this post anywhere inside the loop. Don’t worry, this will only be shown to users that have specific permissions. Average user will not see this button.
<?php edit_post_link(__('{Quick Edit}'), ''); ?>
Adding a Quick Edit Button to WordPress Comments
By default this code is added in the WordPress comments.php file, but if you don’t have the functionality, then add the following code:
<?php edit_comment_link(__('{Quick Edit}'), ''); ?>
By adding these codes, a Quick Edit link will be displayed on your post page, so you can simply edit the post with one click rather than searching the wp-admin panel for editing.
Thanks, really helped saving time. After used a new theme on one of my site, i missed this feature which exist other site’s themes, i quickly added.
Glad our guide was helpful
What’s “anywhere inside the loop”? Under waht line is that?
The idea of adding the Quick Edit to posts is great, but can I also add it to Links. I have a large number of links that need to be re categorised and Quick edit would be a great help.
I know this is an old post, but I really needed to thank you for this. You instructions were simple to follow (and understand) and solved my problem perfectly! =)
Searched all over for instructions that made sense. Yours did. Thanks!
Thank you for this post! I’ve accidentally deleted this code-snipplet from my WooThemes-Theme