Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

When users are on the 'edit profile' page, it's hard to tell how to get back to the site. I know you can click on the site name at the top left corner but it doesn't seem obvious. Is there a way to add a link back to the page they were on? Or perhaps a plugin I can install?

share|improve this question
add comment

1 Answer 1

Put this code in the functions.php file.

add_action( 'show_user_profile', 'my_show_extra_profile_fields' );
add_action( 'edit_user_profile', 'my_show_extra_profile_fields' );

function my_show_extra_profile_fields( $user ) { ?>
    <h3>Go back to home</h3>
    <table class="form-table">
        <tr>
            <td>
                <a href="<?php echo home_url(); ?>" title="Go back">Home</a>
            </td>
        </tr>
    </table>
<?php }

Check this tutorial for more detail.

You can put any mark up you want, I just modified the example and have put a link to go to the homepage. Hope this helps!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.