Skip to main content

better_messages_mini_chat_button

WebSocket Version Guide
This functionality available only with WebSocket Version
Legacy shortcode

Prefer better_messages_live_chat_button for new implementations — it auto-decides between mini chat and full page based on plugin settings, and reliably handles guest visitors.

Mini chat button shortcode

Shows mini chat button (opens mini chat with user on click)

This button will work only if Mini Chats option is enabled in plugin settings

AttributeWhats it forDefault
textSets button text label"Private Message"
user_id

Set User ID with whom conversation will be started

Post author of WordPress Post/Page
subject

Set subject for conversation
If conversation already exists it will be ignored

None
unique_tag

This will be usefully if you want to create unique conversations between buyers and seller, when they're discussing different products.


For example set unique_tag to product_123 to create or open additional unique conversation between 2 members based on the tag.

None
class

Sets additional class to button html element.
Useful for additional CSS styling.

None
[better_messages_mini_chat_button text="Private Message" subject="New conversation subject" class="extra-class"]

Frequently asked questions

Why is this marked legacy?

The newer [better_messages_live_chat_button] shortcode handles all the same use cases plus: guest authorization flow, automatic decision between mini-chat and full-page based on settings, and AI bot targeting via negative user IDs. Use it for new implementations.

Will this shortcode keep working?

Yes — backwards-compatible. Existing pages using [better_messages_mini_chat_button] continue to work indefinitely. No need to migrate immediately.

What's unique_tag for?

Creates a separate conversation per tag, even between the same two users. E.g., unique_tag="product_123" opens (or creates) a thread specific to "product 123". Useful for marketplace product Q&A where buyer-vendor have a per-product context.

Does this work for guests?

No — the legacy shortcode doesn't handle guest auth flow. Use better_messages_live_chat_button for guest-compatible usage.

Does it respect the Mini Chats setting?

Yes — the button only opens a mini chat if Mini Chats is enabled in plugin settings. Otherwise, the button does nothing.

See also