better_messages_single_conversation
Embed one specific conversation thread on any WordPress page using its thread ID. Unlike the main [better_messages] shortcode (which shows the user's full inbox), this shortcode locks the page to a single thread — useful for support ticket pages, announcement threads, or any context where you want users to interact with a specific conversation only.
When to use it#
| Use case | Why a single conversation shortcode |
|---|---|
| Support ticket page | Each ticket is one thread; embed that thread inline |
| Announcement thread | A specific "site announcements" thread shown on the homepage |
| Event-day Q&A thread | A pinned thread visible during a live event |
| Customer-vendor order page | The conversation tied to a specific order |
| Documentation page Q&A | A specific thread for question/answer about that doc |
Attributes#
| Attribute | What it does | Default |
|---|---|---|
thread_id | The Better Messages thread ID to display | No default — required |
Usage#
[better_messages_single_conversation thread_id="55"]
Replace 55 with the actual thread ID. To find a thread's ID, view the conversation in WP Admin → Better Messages → Messages Viewer (when enabled) or via the REST API.
Examples#
Site-wide announcement thread#
[better_messages_single_conversation thread_id="1"]
Embed on the homepage to show every visitor the latest site-wide announcements thread.
Per-order conversation (dynamic)#
// In a template file:
$thread_id = get_post_meta($order_id, '_bm_thread_id', true);
echo do_shortcode('[better_messages_single_conversation thread_id="' . $thread_id . '"]');
Embed the conversation tied to a specific WooCommerce order on the order detail page.
Documentation Q&A thread#
[better_messages_single_conversation thread_id="42"]
Drop into a documentation page to enable inline Q&A on that doc.
Frequently asked questions#
Can users without access to the thread see it?#
No — standard access rules apply. If the current user isn't a participant in the thread (and the thread isn't a public chat room they have access to), they see a permission error.
Can I show a thread to guests?#
Only if the thread is in a chat room with guest access enabled. Standard DMs require login.
What happens if the thread is deleted?#
The shortcode renders an empty state — "This conversation is no longer available." To handle gracefully, conditionally include the shortcode based on thread existence.
Can I show multiple threads on the same page?#
Yes — multiple [better_messages_single_conversation] shortcodes can appear on one page. Each renders independently.
Does this work with the WebSocket version's real-time features?#
Yes — embedded threads get real-time updates, typing indicators, presence, and all other WebSocket-version features.
See also#
- better_messages — full inbox layout
- better_messages_user_conversation — auto-create with a specific user
- better_messages_live_chat_button — start a new conversation
- Group conversations — multi-user threads