0
Add Edit Link To WordPress Posts and Pages
This is a WordPress Quick Tip: How to add an “Edit this page” link to your WordPress posts and pages that will only be displayed if you are logged in.
First, find the location where you want to display the link. A good place to put it is either just before, or just after the main content of the page.
I look for the following code in the /wp-content/YourThemeName/page.php (or single.php) file:
<?php the_content(); ?>
and place the following code just after it:
<?php edit_post_link('[edit this page]', '<p>', '</p>'); ?>
That displays [edit this page] in it’s own paragraph so it shouldn’t mess up your page formatting on you! Hope this helps.
Leave a Reply













