Created
May 30, 2013 18:13
-
-
Save astockwell/5679882 to your computer and use it in GitHub Desktop.
Creates edit post/page button in wordpress (only displays if user is logged in) so you can hide the terrible admin bar.
This file contains 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
<!-- Place in "body > header" or equivalent --> | |
<?php edit_post_link( __('Edit'), '<span class="edit-link">', '</span>' ); ?> |
This file contains 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
.edit-link { | |
position: absolute; | |
top: 0; | |
right: 0; | |
a { | |
display: block; | |
padding: 1px 5px; | |
color: white; | |
background-color: blue; | |
text-decoration: none; | |
text-shadow: rgba(black, 0.2) 0 1px 0; | |
&:hover { | |
background-color: #333; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment