Skip to content

Shortcodes Reference

Display member blog content anywhere on your site using shortcodes. Add them to pages, posts, widgets, or theme templates.

Shortcode Purpose
[bp-member-blog] Post creation form
[member-blog-dashboard] Member blog dashboard
[bp-member-blog-list] Posts from a specific member
[bp-member-blog-recent] Recent posts from all members
[bp-member-blog-popular] Most viewed posts
[bp-member-blog-related] Posts related to the one being read
[bp-member-blog-categories] Category display
[bp-member-blog-authors] Top contributors showcase
[bp-member-blog-topic] A single category or tag, with its writers
[bp-member-blog-featured] Posts an editor has featured
[bp-member-blog-following] Posts from writers this member follows
[bp-member-blog-reading-list] This member’s saved posts

Pro adds more (series, co-authors, scheduling, analytics, credits) - see the Pro feature pages.

[bp-member-blog]

Displays the post creation form where members write and submit new posts.

Use case: place on a dedicated “Submit Article” or “Create Post” page.

Requirements:

  • User must be logged in
  • User’s role must be in allowed roles
  • User’s member type must be allowed (if configured)

[member-blog-dashboard]

The member’s own hub - their posts, drafts, pending submissions and reading list.

[bp-member-blog-list]

Displays posts from a specific member.

Attribute Default Description
user_id current user User ID to show posts from
count 5 Number of posts
columns 1 Grid columns (1-4)
show_excerpt yes Display post excerpts
show_image yes Display featured images
show_date yes Display publish date
show_author no Display author name
orderby date date, title, comment_count, rand
order DESC ASC or DESC
load_more no Replace the pager with a “Load more” button
category (empty) Filter by category slug
tag (empty) Filter by tag slug
class (empty) Extra CSS class

Example

[bp-member-blog-list user_id="5" count="10" columns="2"]

Shows 10 posts from user ID 5 in a 2-column grid.

[bp-member-blog-recent]

Displays recent posts from all members across your site.

Attribute Default Description
count 10 Number of posts
columns 3 Grid columns (1-4)
show_excerpt yes Display post excerpts
show_image yes Display featured images
show_date yes Display publish date
show_author yes Display author name
show_avatar yes Display author avatar
show_search no Show a search box
show_filter no Show category filters
load_more no Replace the pager with a “Load more” button
category (empty) Filter by category
exclude_users (empty) User IDs to exclude
class (empty) Extra CSS class

Example

[bp-member-blog-recent count="6" columns="3" show_excerpt="yes"]

Homepage feature showing 6 recent posts in 3 columns.

[bp-member-blog-popular]

Displays most viewed posts from your members.

Attribute Default Description
count 10 Number of posts
columns 3 Grid columns (1-4)
show_excerpt yes Display post excerpts
show_image yes Display featured images
show_date yes Display publish date
show_author yes Display author name
show_views yes Display view count
timeframe all all, week, month, year
load_more no Replace the pager with a “Load more” button
category (empty) Filter by category
class (empty) Extra CSS class

Example

[bp-member-blog-popular timeframe="month" count="5"]

Shows top 5 posts from this month.

[bp-member-blog-related]

Shows member posts related to the one being read, so the reader keeps reading. Intended for the foot of a single post.

Attribute Default Description
count 4 Number of posts
columns 2 Grid columns (1-4)
post_id 0 The post to find relations for. 0 means the post being viewed
show_image yes Display featured images
show_date yes Display publish date
class (empty) Extra CSS class

Example

[bp-member-blog-related count="3" columns="3"]

Three related posts under the article being read.

If there is nothing related, this renders nothing at all - not an empty box. A strip captioned “no related posts” at the foot of an article is worse than no strip, so it stays absent rather than apologising. There is also no excerpt: it sits beneath something the reader is already reading and has to stay compact.

[bp-member-blog-categories]

Displays blog categories in various formats.

Attribute Default Description
style cloud cloud, list or grid
count 20 Categories to show
show_count yes Display post counts
orderby count Sort field
order DESC ASC or DESC
hide_empty yes Hide empty categories
exclude (empty) Term IDs to exclude
parent (empty) Show children of this term only
class (empty) Extra CSS class

[bp-member-blog-authors]

Showcases your most active member contributors.

Attribute Default Description
count 10 Number of authors
columns 4 Grid columns
show_avatar yes Display avatar
show_count yes Display post count
show_bio no Display the writer’s bio
avatar_size 80 Avatar size in pixels
orderby post_count Sort field
order DESC ASC or DESC
role (empty) Restrict to a role
load_more no Replace the pager with a “Load more” button
class (empty) Extra CSS class

The directory is paged: count is the number of writers per page (at most 50), and a pager - or the “Load more” button - reaches the rest.

Using Shortcodes in Widgets

Go to Appearance → Widgets Add a Text or Custom HTML widget Paste your shortcode Save the widget

Using in Theme Templates

<?php echo do_shortcode(‘[bp-member-blog-recent count=“5”]’); ?>

Combining Shortcodes

Create a complete blog page by combining shortcodes:

<h2>Popular This Month</h2> [bp-member-blog-popular timeframe=“month” count=“3” columns=“3”]

<h2>Latest Posts</h2> [bp-member-blog-recent count=“9” columns=“3”]

<h2>Top Contributors</h2> [bp-member-blog-authors count=“8” columns=“4”]

Load More

Add load_more=“yes” to replace numbered pagination with a “Load more” button that appends the next page in place, without a reload.

[bp-member-blog-recent count=“9” columns=“3” load_more=“yes”]

Supported on: [bp-member-blog-recent], [bp-member-blog-list], [bp-member-blog-popular], [bp-member-blog-following], [bp-member-blog-reading-list], [bp-member-blog-authors]. Default is no, so nothing changes on an existing page until you ask for it.

How it behaves

The numbered pager is always rendered. The button is only revealed if the JavaScript loads, and the pager is hidden at that moment - so a visitor without JavaScript, or on a page where the script failed, still gets working pagination instead of a dead button. If a request for the next page fails, the pager comes back and the reason is shown next to the button. Each load announces how many posts (or, in the author directory, writers) were added to screen readers, and the button keeps keyboard focus until the last page, where focus moves to the first newly loaded post.

Not supported

[bp-member-blog-topic] has no pagination of its own yet, so there is nothing to enhance; it shows the first page only. [bp-member-blog-list] ignores load_more when orderby=“rand”. A random order is re-rolled per request, so appending “the next page” would repeat posts the reader already has. On another member’s reading list the button is not shown, because the feed is read from the logged-in session.