better_messages_my_messages_url
A URL-only shortcode that returns the path to the logged-in user's inbox. Doesn't render any UI — just the URL string. Designed for use cases where you need the inbox URL as a link target (menu items, buttons, custom dashboard widgets) without embedding the full messenger.
When to use it
| Scenario | Pattern |
|---|---|
| WordPress menu link to Messages | Use this shortcode with the Shortcode in Menus plugin |
| Custom dashboard "View Inbox" button | Wrap the URL in your own anchor tag |
| Account-page link list | Add as one item in a user's account-actions list |
| Author bio "Message me" link | URL-only with custom button styling |
Usage
[better_messages_my_messages_url]
Returns the URL of the page where the messenger lives — typically /messages/ or wherever WP Admin → Better Messages → Settings → General → Messages Location points.
In a menu (via Shortcode in Menus)
- Install Shortcode in Menus
- Appearance → Menus → Add a Custom Link
- URL:
[better_messages_my_messages_url] - Label: "Messages"
When rendered, the URL placeholder is replaced with the actual inbox URL.
In a custom anchor
<a class="btn btn-primary" href="[better_messages_my_messages_url]">
View My Messages
</a>
The shortcode renders to the bare URL — wrap it in any element you want.
Frequently asked questions
What URL does this return for non-logged-in users?
The login URL is returned, with a redirect parameter pointing back to the messages page after login.
Does this return a relative or absolute URL?
Absolute URL — full https://yoursite.com/messages/ form. Useful for emails and external links.
Can I include this in an email template?
Yes — though emails typically use a different anchor (each thread has its own deep-link URL). For "view all my messages" links in transactional emails, this is useful.
Does the URL include any query parameters?
By default, no — just the base inbox path. Use the bp_better_messages_inbox_url filter to add custom params (e.g., utm tracking).
Will the URL work for guest users?
Guests don't have a personal inbox — the URL falls back to the chat room or guest landing page configured in settings.
See also
- better_messages — embed the full inbox UI
- better_messages_unread_counter — unread count for menus
- Easy customization — configure where the inbox lives