Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

Save time by adding a Quick Edit Button in WordPress Posts

Last updated on by
Elegant Themes
Save time by adding a Quick Edit Button in WordPress Posts

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.


Editorial Staff at WPBeginner is a team of WordPress lovers led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »
  • melissa

    Searched all over for instructions that made sense. Yours did. Thanks! :)

  • http://www.e-vok.de Matthias

    Thank you for this post! I’ve accidentally deleted this code-snipplet from my WooThemes-Theme :)