# Log In Link Under the MemberPress Unauthorized Message

> Adds a "Already a member? Log in" link below the MemberPress access-denied message, returning members to the same page after login.

- Type: Universal
- Runs: Mepr unauthorized message after
- Category: [Login](https://wpide.com/library/category/login/)
- Requires: MemberPress
- Tags: login, memberpress, members
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/memberpress-unauthorized-login-link/

## Code

```php
<?php if ( ! is_user_logged_in() ) : ?>
<p class="wpide-mepr-login-link">
    Already a member?
    <a href="<?php echo esc_url( wp_login_url( get_permalink() ? get_permalink() : home_url( '/' ) ) ); ?>">Log in to continue reading</a>.
</p>
<?php endif; ?>
```

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Log In Link Under the MemberPress Unauthorized Message" in its snippet library and add it in one click; or create a new Universal snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
