Shortcode Reference
Shortcode Reference
Section titled “Shortcode Reference”[bp_reactions]
Section titled “[bp_reactions]”Renders a reaction button and reaction count display for any content. Use this shortcode to add reactions to post types or page areas that are not covered by the built-in BuddyPress and bbPress integrations.
[bp_reactions]The shortcode reads context from the current post automatically when placed inside a post loop. When used outside a loop, pass the post_id and post_type attributes explicitly.
Attributes
Section titled “Attributes”| Attribute | Type | Default | Description |
|---|---|---|---|
post_id |
int |
Current post ID | ID of the content item to attach reactions to |
post_type |
string |
Current post type | Post type slug (e.g. post, page, or any custom post type) |
bprs_id |
int |
1 |
Internal reaction set ID. Use 1 for the default activity set. |
Examples
Section titled “Examples”Render reactions for the current post inside a template:
[bp_reactions]Render reactions for a specific post:
[bp_reactions post_id="42" post_type="post"]- Only logged-in members can add or remove reactions. The button is visible to all visitors, but clicking it prompts guests to log in.
- Reaction counts are visible to all visitors regardless of login state.
- The shortcode respects the animation settings stored for the matching reaction set.
Internal reaction sets
Section titled “Internal reaction sets”The plugin uses an internal database table ({prefix}bp_reactions_shortcodes) to store named reaction configurations. Each configuration has an ID (bprs_id). The built-in integrations use fixed IDs:
| ID | Name | Used for |
|---|---|---|
| 1 | Activity Reaction | BuddyPress activities |
| 2 | Activity Comment Reaction | Activity comments |
When you add reactions to custom post types via the [bp_reactions] shortcode without specifying bprs_id, it defaults to the Activity Reaction set (ID 1). Create additional sets in the database if you need separate emoji configurations for different custom post types.

