Feature #14817

Embed a Commons Group forum to a Site page

Added by scott voth 26 days ago. Updated 11 days ago.

Priority name:
Category name:
Group Forums
Target version:
Start date:
Due date:
% Done:


Estimated time:


Ann Del Principe from Kingsborough would like to display her group forum on a page of her group site. Is it possible to create a custom iframe shortcode for this? Or another solution?

group-forum shortcode.jpg (177 KB) group-forum shortcode.jpg Raymond Hoh, 2021-10-01 07:39 PM


#1 Updated by Raymond Hoh 26 days ago

Provided that the group is public, it's possible to use the RSS feed for a group. For example, However, this includes all group activity.

Then if you're using the Block Editor, you can use the RSS block to add the RSS URL to display the feed that way.

If we wanted to limit the group RSS feed to be more granular for forum posts, we will need to write some custom code so the feed URL could be customized. Shouldn't take too much code. If we're interested in this direction, let me know.

#2 Updated by Raymond Hoh 26 days ago

  • Assignee set to Raymond Hoh


After the maintenance release tomorrow (September 28th), you'll be able to use the following RSS feeds to grab the group forum activity:

  1. Group activity RSS URL, powered by BuddyPress and filtered by forum activity:,bbp_reply_create
  2. Group forum RSS URL, powered by bbPress:

Change cuny-pie to the group's slug. The group must be public as well. Combine this with the Block Editor's RSS block as mentioned above and Ann should be good to go.

If Ann isn't using the Block Editor, it looks like we have two RSS embedding plugins -- RSSImport and RSS Multi Importer -- that could work, however they're both a little old and will need some testing.

If that isn't enough, let us know.

(Code reference:,

#3 Updated by scott voth 25 days ago

Thanks Ray! Just to clarify, using this solution would only display the forum. It would not allow posting replies, right?

#4 Updated by scott voth 25 days ago

I heard back from Ann - Since she is using the forum for a class, she needs it to be private. Is that possible?

#5 Updated by Raymond Hoh 24 days ago

Hi Scott,

Unfortunately, the RSS solution I posted above would only work if the group is public due to privacy issues.

Boone, I just remembered that I have some prior art in our BP Event Organiser plugin to embed a group calendar using a minimal version of the page. For example,

We can accomplish something similar for our group forums. Then Ann can embed the forum using a shortcode like [group-forum slug="cuny-pie"], which would call on the iframe.

I've actually put something together locally and it works quite well. Code isn't large; it's about 60 lines of code plus a custom template file (still need to write the shortcode).

Just so there isn't two entry points, if you're viewing the embedded forum, I've made it so it's basically read-only. The new topic post form is removed and clicking on a topic link will load the full version of the page and not in the iframe. If the group is private, we'll have to do some membership checks before rendering the iframe in the shortcode.

If you want me to move forward with this idea, I can put something up on cdev for testing.

#6 Updated by Boone Gorges 23 days ago

  • Target version set to 1.19.0

Cool, Ray. If you can do this pretty easily, and make it read-only, then I'd say let's go for it. I'll put into the 1.19.0 milestone for now.

#7 Updated by Raymond Hoh 22 days ago

I've got a first pass of this ready on cdev.

To test, use the following shortcode in a post or page:

[group-forum slug="xxx" height="800"]

xxx is the group slug. For example in the group URL, "digital-humanities-initiative" is the group slug. height is optional and defaults to 600.

If the group is public, the forum is embedded.

If the group is not public:

  • When logged out, you will see the following message: "To view this group forum, please login and ensure you are a member of the group."
  • When logged in, but not a member of the group, you will see the following message if the group is private: "You do not have access to view this group forum. You can request membership to the group here." If the group is hidden, you will see the following message: "You do not have access to view this group forum. Please contact the site administrator to request access to the group."

An example can be found on cdev here:

For those that cannot access cdev, I've attached a logged-out screenshot embedding two group forums on a page: One from a public group and one from a private group:

#8 Updated by Boone Gorges 19 days ago

Wow, this is really slick, Ray.

#9 Updated by Raymond Hoh 16 days ago

  • Status changed from New to Staged for Production Release
  • Target version changed from 1.19.0 to 1.18.20

I've committed the code here:


After the next maintenance release on the 12th, Ann should be able to use the [group-forum] shortcode and the group forum should display under the circumstances I explained here.

We should also document this on the Help site somewhere, but can wait until later to do this.

#10 Updated by scott voth 12 days ago

Thanks Ray. I have added documentation here -

#11 Updated by Raymond Hoh 12 days ago

Thanks Scott for creating the documentation page for the shortcode!

#12 Updated by Boone Gorges 11 days ago

  • Status changed from Staged for Production Release to Resolved

Also available in: Atom PDF