How to get an edit post or edit page link
How to get an edit post or edit page link
Feb 29Some themes do not include an ‘edit post’ or ‘edit page’ link!
It’s hard to believe that such a simple addition can be forgotten and it’s so useful!
A small snippet of code rectifies the problem easily. Here’s how you do it …
- Login and go to Admin>presentation>theme editor
- Open file ‘Single.php’ Single post file in the list
- You can enter the edit link wherever you think best
- example; find the line
<?php the_content('<p>Read the rest of this entry »</p>'); ?>
and add beneath it
<?php edit_post_link('(Edit Post)', '', ''); ?>
- Save the page and refresh a full blog post page to see your edit link under the post
- Repeat the same process for a page by editing the ‘Page template’ file in the same way
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.
