I've been trawling through forums but can't find a solution to this. If anyone can help, it would be greatly appreciated! I'm trying to display a link to current users author page (all users have author permissions). I'm using this at the moment:
<a href="<?php echo home_url() . '/author/' . get_the_author_meta( 'user_login', wp_get_current_user()->ID ); ?>" >My personal page</a>
The problem is, the author link displays when there is no user logged in. How can I only display the author link to users that are logged in?