Skip to main content

better_messages_single_conversation

Compatibility
This guide compatible with Better Messages 2.0.93 or higher

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 caseWhy a single conversation shortcode
Support ticket pageEach ticket is one thread; embed that thread inline
Announcement threadA specific "site announcements" thread shown on the homepage
Event-day Q&A threadA pinned thread visible during a live event
Customer-vendor order pageThe conversation tied to a specific order
Documentation page Q&AA specific thread for question/answer about that doc

Attributes#

AttributeWhat it doesDefault
thread_idThe Better Messages thread ID to displayNo 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#