What You’ll Learn
- Available analytics shortcodes
- Shortcode attributes and options
- Where to place shortcodes
- Example use cases
Main Analytics Shortcode
[bp-member-blog-analytics]
Displays the full analytics dashboard for the current logged-in user.
Attributes
| Attribute | Default | Description |
|---|---|---|
user_id | Current user | Show analytics for a specific user |
days | 30 | Number of days to display |
show_chart | yes | Display the views chart |
show_sources | yes | Display traffic sources |
show_top_posts | yes | Display top posts list |
Examples
Basic usage – show current user’s analytics:
[bp-member-blog-analytics]
Show last 7 days only:
[bp-member-blog-analytics days="7"]
Show specific user’s analytics (by user ID):
[bp-member-blog-analytics user_id="5"]
Chart only, no lists:
[bp-member-blog-analytics show_sources="no" show_top_posts="no"]
Post Views Counter Shortcode
[bp-member-blog-views]
Displays view count for a specific post. Use inside post content or templates.
Attributes
| Attribute | Default | Description |
|---|---|---|
post_id | Current post | Show views for a specific post |
format | number | Display format: number, text, or icon |
label | (empty) | Text to show before the count |
Examples
Show views for current post:
[bp-member-blog-views]
With a label:
[bp-member-blog-views label="Views: "]
Text format (includes “views” word):
[bp-member-blog-views format="text"]
Output: “1,234 views”
Specific post:
[bp-member-blog-views post_id="123"]
Author Stats Shortcode
[bp-member-blog-author-stats]
Displays summary statistics for an author.
Attributes
| Attribute | Default | Description |
|---|---|---|
user_id | Current user | Show stats for specific user |
show_posts | yes | Show total post count |
show_views | yes | Show total views |
show_avg | yes | Show average views per post |
layout | inline | Display layout: inline, grid, or vertical |
Examples
Basic author stats:
[bp-member-blog-author-stats]
Grid layout with all stats:
[bp-member-blog-author-stats layout="grid"]
Views only:
[bp-member-blog-author-stats show_posts="no" show_avg="no"]
Top Authors Leaderboard
[bp-member-blog-top-authors]
Displays a leaderboard of top authors by views or post count.
Attributes
| Attribute | Default | Description |
|---|---|---|
count | 10 | Number of authors to show |
orderby | views | Sort by: views, posts, or average |
days | 30 | Time period to consider |
show_avatar | yes | Display author avatars |
show_stats | yes | Show view/post counts |
Examples
Top 5 authors this month:
[bp-member-blog-top-authors count="5" days="30"]
Most prolific authors (by post count):
[bp-member-blog-top-authors orderby="posts"]
All-time top authors:
[bp-member-blog-top-authors days="0"]
Where to Use Shortcodes
On Pages
Create a dedicated analytics or leaderboard page:
- Create a new page
- Add the shortcode to the content
- Publish the page
In Widgets
Add to sidebars or widget areas:
- Go to Appearance → Widgets
- Add a Text or Custom HTML widget
- Paste the shortcode
- Save
In Theme Templates
Use PHP to output shortcodes in templates:
Example Use Cases
Author Profile Page
Show author stats on their profile:
My Stats
[bp-member-blog-author-stats layout="grid"]
My Top Posts
[bp-member-blog-analytics show_chart="no" show_sources="no"]
Community Leaderboard Page
Top Authors This Month
[bp-member-blog-top-authors count="10" days="30"]
All-Time Leaders
[bp-member-blog-top-authors count="5" days="0"]
Sidebar Widget
Top Contributors
[bp-member-blog-top-authors count="5" show_stats="no"]
Styling Shortcode Output
All shortcodes output elements with CSS classes for customization:
/* Analytics container */
.bp-member-blog-analytics { }
/* Views counter */
.bp-member-blog-views { }
/* Author stats */
.bp-member-blog-author-stats { }
/* Top authors list */
.bp-member-blog-top-authors { }
.bp-member-blog-author-item { }
Related Docs
- How to Navigate Your Author Dashboard
- Understanding Your Post Analytics
- All Shortcodes Reference (Free Plugin)
