I’m always switching back and forth between my site and the Dashboard. To make it easier to get back and forth, I’ve got admin links placed all over the place. Just paste this code in your
sidebar.php
, footer.php
, your main page loop or anywhere else you want it to appear.<?php if ( is_user_logged_in() ) { echo '<a href="wp-admin">admin</a>'; } else { echo ''; }; ?>
This is basically telling WordPress to show the link to wp-admin
, if you’re logged in and to show nothing if you’re not.