Last active
December 7, 2017 12:04
-
-
Save shoutershub/c989dc6130080d93e988b12cb24d6f39 to your computer and use it in GitHub Desktop.
WordPress - Add custom edit post link
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if(current_user_can('administrator')){ ?> | |
<a href="<?php bloginfo('url');?>/wp-admin/edit.php?p=<?php the_ID(); ?>">Edit Post</a> | |
<?php } ?> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
removed space between < ?php the_ID(); ?> - and things worked perfectly