Skip to content

Renders the reaction button and reaction display for a piece of content. The built-in BuddyPress and bbPress integrations output this automatically; use the shortcode directly only when you want reactions inside a custom template or a post-type area the integrations do not cover.

[bp_reactions]

The handler reads the current post type from context with get_post_type() (falling back to post), then loads the saved reaction set and animation settings for that content type. It does not take post_id or post_type attributes - place the shortcode inside the loop for the item you want reactions on.

Attribute Type Default Description
id int 1 Internal reaction-set ID (the id of a row in {prefix}bp_reactions_shortcodes). Determines which stored reaction set the button reads and writes against.

id is the only attribute the handler reads. There are no post_id, post_type, or bprs_id attributes.

Render reactions for the current item inside a template loop:

[bp_reactions]

Render against a specific reaction set:

[bp_reactions id="2"]
  • Only logged-in members can add or remove reactions. Guests can see reactions but cannot add them.
  • Reaction counts are visible to all visitors.
  • The shortcode uses the animation setting stored for the matching content type’s reaction set.

Reaction sets are rows in the {prefix}bp_reactions_shortcodes table, each with an id and a JSON options blob holding the chosen emoji IDs, name, post type, and animation flag. On activation the plugin seeds sets for blog posts, activities, activity comments, forum topics, and forum replies. The set used for a given content type is resolved by that content type’s saved settings, not by a fixed ID - so the exact id values depend on activation order on your install. Inspect the table (or the Reactions tab) to find the id you need before passing it to the shortcode.