rtMedia Integration
BuddyX Pro includes a compatibility layer for rtMedia. It does two things: it re-renders the rtMedia media screens inside BuddyX Pro’s own page structure, and it adjusts the image URL used for photos in the activity stream. The page-structure half only applies when your BuddyPress template pack is BP Nouveau. This page covers both, plus what the theme does not do.
What is rtMedia?
Section titled “What is rtMedia?”rtMedia is a plugin that adds photo, video, audio and document uploads to BuddyPress. Members get media tabs on their profiles, groups get a media tab, and uploads appear in the activity stream.
BuddyX Pro does not add media features. The uploading, albums, privacy and playback all come from rtMedia. What the theme adds is presentation: on BP Nouveau the rtMedia screen is wrapped in BuddyX Pro containers and the member or group wrapper picks up the iconic navigation class. On the legacy template pack the theme’s override runs but outputs rtMedia’s own BuddyPress markup with none of those wrappers.
Requirements
Section titled “Requirements”| Requirement | Notes |
|---|---|
| rtMedia plugin | Required. The theme loads its rtMedia compatibility file only when the RTMedia class exists. |
| BuddyPress | Required by rtMedia itself, and by the activity filter described below. |
| BuddyX Pro theme | Active. There is nothing to switch on. |
The integration is entirely conditional. With rtMedia deactivated, none of this code runs.
Installation & Setup
Section titled “Installation & Setup”Step 1: Install rtMedia
Section titled “Step 1: Install rtMedia”- Go to Plugins > Add New
- Search for “rtMedia”
- Click Install Now, then Activate
The theme picks the integration up automatically on the next page load. There is no theme setting to enable.
Step 2: Set Your Navigation Style
Section titled “Step 2: Set Your Navigation Style”On BP Nouveau, the rtMedia screen reads the same navigation style settings the rest of your community uses. Only the iconic value is acted on there: the swipe variants produce no class on media screens, so they render like Default.
For member media screens:
- Go to Appearance > Customize
- Open Community Settings > Single Member
- Set Single Member Navigation Style
- Click Publish
For group media screens:
- Go to Appearance > Customize
- Open Community Settings > Single Group
- Set Single Group Navigation Style
- Click Publish
Step 3: Check Both Template Packs
Section titled “Step 3: Check Both Template Packs”The theme’s rtMedia template branches on which BuddyPress template pack your site uses. It reads the _bp_theme_package_id option and takes one path for BP Nouveau and another for the legacy pack. The two are not equivalent: only the Nouveau branch prints the theme’s .container / .site-wrapper / .bp-wrap shell and the nav-style class. The legacy branch prints rtMedia’s own BuddyPress markup inside #buddypress and nothing more. If you switch BuddyPress template packs, open a member media tab and a group media tab afterwards to confirm the layout still looks right.
What You Can Do
Section titled “What You Can Do”| Capability | What actually happens |
|---|---|
| Media screens match the rest of the theme on BP Nouveau | The theme ships its own rtmedia/main.php. On the Nouveau branch it re-renders the rtMedia screen inside BuddyX Pro containers. |
| Member and group nav on media screens (BP Nouveau) | The Nouveau branch adds buddyx-nav-iconic to the member or group wrapper when your nav style is iconic. |
| Both BuddyPress template packs render | Separate branches for BP Nouveau and the legacy pack. Only the Nouveau branch adds theme containers and the nav-style class. |
| Photo URL adjustment in the activity stream | A filter swaps the image URL on photo media items in the activity component and on group pages. |
The theme does not add albums, privacy controls, upload limits, media types, or a media widget. All of that stays with rtMedia.
Theme Features
Section titled “Theme Features”The rtMedia Template Override
Section titled “The rtMedia Template Override”The theme ships its own rtmedia/main.php at the theme root, replacing the rtMedia main template.
What the override does on every template pack:
- Wraps everything in a
#buddypresselement, so BuddyPress and BuddyX Pro styling both apply - Reads the
_bp_theme_package_idoption and branches between a BP Nouveau path and a legacy path - Branches again between member context and group context
What only the BP Nouveau branch does:
- Outputs the theme’s own containers:
.container,.site-wrapperand.bp-wraparound#item-body - Adds
buddyx-nav-iconicto the.site-wrapperelement when the nav style isiconic
The practical effect on BP Nouveau is that the media tab sits inside the same shell as the activity tab or the members directory, rather than in rtMedia’s own bare markup. On the legacy pack the branch emits #item-body and rtMedia’s own item-header / item-nav markup, without the theme shell.
Navigation Style on Media Screens
Section titled “Navigation Style on Media Screens”Inside the BP Nouveau branch of rtmedia/main.php the member path reads buddypress_single_member_nav_style and the group path reads buddypress_single_group_nav_style. Both fall back to iconic, which is also the Customizer default, and iconic adds the class buddyx-nav-iconic to the .site-wrapper element (member-home or group-home).
Two divergences from the regular community screens:
- The template tests for
iconiconly.iconic_swipe1andiconic_swipe2fall to an empty class here, so media screens render them like Default.buddypress/members/single/home.phpandbuddypress/groups/single/home.phpmap all three values. - The legacy template-pack branch does not read either theme mod at all.
Activity Stream Photo Filter
Section titled “Activity Stream Photo Filter”The theme attaches one function, buddyx_custom_rtmedia_filter(), to rtMedia’s own rtmedia_single_activity_filter hook at priority 10.
It only does anything when all three of these are true:
- The
buddyx_rtmedia_filter_enabledfilter returns something truthy. It defaults to true. - The media item’s type is
photo. Video, audio and documents are left alone. - The current screen is the activity component, or a group page.
If any one of those is false, the activity HTML is returned unchanged.
When all three are true, the function asks WordPress for the attachment URL at the image size custom_rtmedia_size and, if it gets one back, rewrites the src attribute in the activity item markup to point at it.
Two behaviours are worth stating plainly, because they change what you actually see:
custom_rtmedia_sizeis not a size the theme registers. The theme registersbuddyxpro-featured,buddyxpro-large,buddyxpro-list,buddyxpro-col-twoandbuddyxpro-col-three. Askingwp_get_attachment_image_src()for a size that is not registered returns the full-size image, so on a stock install this filter resolves to the full-size URL.- The rewrite is a regular expression over the whole activity item HTML with no match limit, so it replaces every
srcattribute in that markup, not only the media image.
If either of those is a problem on your site, turn the filter off. See the developer section below.
Settings
Section titled “Settings”There is no rtMedia settings panel in the Customizer, and no on/off switch for the activity filter in the admin. Two existing theme settings do affect the rtMedia screen.
Single Member Navigation Style
Section titled “Single Member Navigation Style”Location: Appearance > Customize > Community Settings > Single Member
Sets the navigation style used on member screens. On the rtMedia media tab only iconic has an effect, and only on BP Nouveau.
Default: iconic
Options: Default, Icon + Label (iconic), Icon + Label (Swipe 1), Icon + Label (Swipe 2).
Single Group Navigation Style
Section titled “Single Group Navigation Style”Location: Appearance > Customize > Community Settings > Single Group
Sets the navigation style used on group screens. On the group media tab only iconic has an effect, and only on BP Nouveau.
Default: iconic
Options: Default, Icon + Label (iconic), Icon + Label (Swipe 1), Icon + Label (Swipe 2).
buddyx_rtmedia_filter_enabled
Section titled “buddyx_rtmedia_filter_enabled”Not a Customizer setting. This is a code-level filter that gates the activity stream photo filter.
Default: true
There is no admin control for it. A site owner who wants it off needs a snippet in a child theme or a small plugin, shown below.
Use Cases
Section titled “Use Cases”A photo-heavy hobby community
Section titled “A photo-heavy hobby community”Members post pictures to the activity stream all day, so the media tab is one of the most visited screens on the site. On BP Nouveau, the theme’s rtmedia/main.php override keeps that tab in the same header, navigation and container widths as the activity tab, instead of dropping visitors into differently-shaped markup halfway through a browsing session. Set your Single Member Navigation Style to Icon + Label and the media tab picks up the same iconic nav class.
A paid community running private groups
Section titled “A paid community running private groups”Each group gets a media tab. The theme’s override has a dedicated group branch, so on BP Nouveau group media screens get the group wrapper and the group nav class rather than a member-style one. If you switch to the legacy template pack during a redesign, budget time to re-check the media tab: the legacy branch renders without the theme’s container shell.
A course site where students submit work as images
Section titled “A course site where students submit work as images”Students upload screenshots to a group activity stream. Because the theme’s activity photo filter resolves to the full-size image on a stock install, submissions display at full resolution in the stream. If you would rather serve a smaller file to keep the stream fast, register custom_rtmedia_size in a child theme so the filter has a real size to hand back.
A large community watching page weight
Section titled “A large community watching page weight”The photo filter applies only in the activity component and on group pages, and only to photo media. If full-size images in the stream are costing you bandwidth, the fastest fix is one line in a child theme to return false from buddyx_rtmedia_filter_enabled, which leaves rtMedia’s own URLs in place.
Troubleshooting
Section titled “Troubleshooting”Media Tab Does Not Match the Rest of the Site
Section titled “Media Tab Does Not Match the Rest of the Site”Problem: The rtMedia screen looks unstyled or differently shaped.
Checks:
- Confirm rtMedia is active. The theme’s compatibility file loads only when the
RTMediaclass exists. - Confirm no plugin or child theme is supplying its own
rtmedia/main.php. The last override to be found wins. - Confirm your BuddyPress template pack is BP Nouveau. On the legacy pack the theme’s container shell is not printed, so the screen legitimately looks different.
Navigation Style Not Applied on the Media Tab
Section titled “Navigation Style Not Applied on the Media Tab”Problem: The media tab navigation looks different from other tabs.
Checks: the media tab honours only the iconic value, and only on BP Nouveau. If your nav style is a Swipe variant, or your template pack is the legacy one, the media tab has no nav-style class by design.
Fix:
- Go to Appearance > Customize > Community Settings > Single Member for member screens, or Single Group for group screens
- Set the navigation style to Icon + Label
- Click Publish
- Clear any page cache and reload the media tab
Activity Photos Are Larger Than Expected
Section titled “Activity Photos Are Larger Than Expected”Problem: Photos in the activity stream load at full size.
Cause: The filter requests the image size custom_rtmedia_size, which is not registered by the theme. An unregistered size resolves to the full-size image.
Fix: Either register custom_rtmedia_size in a child theme so the filter has a real size to return, or disable the filter. Both snippets are in the developer section.
The Wrong Image Is Replaced in an Activity Item
Section titled “The Wrong Image Is Replaced in an Activity Item”Problem: An avatar or another image inside an activity item has been swapped for the media photo.
Cause: The rewrite is a regular expression over the activity item HTML with no match limit, so every src attribute in that markup is replaced.
Fix: Return false from buddyx_rtmedia_filter_enabled to leave rtMedia’s original URLs alone.
The Filter Does Nothing at All
Section titled “The Filter Does Nothing at All”Problem: Activity photo URLs are unchanged.
Checks:
- The media item must be of type
photo. Video, audio and documents are skipped. - The screen must be the activity component or a group page. On a member profile media tab, for example, the filter does not run.
buddyx_rtmedia_filter_enabledmust not have been filtered to false anywhere.
For Developers
Section titled “For Developers”Loading Gate
Section titled “Loading Gate”The compatibility file is required in functions.php behind a class_exists( 'RTMedia' ) check, so nothing in inc/compatibility/rtmedia/ is parsed when rtMedia is inactive.
Filters
Section titled “Filters”| Filter | Defined in | Default | Purpose |
|---|---|---|---|
buddyx_rtmedia_filter_enabled |
inc/compatibility/rtmedia/rtmedia-functions.php |
true |
Gates buddyx_custom_rtmedia_filter(). Return false to leave activity markup untouched. |
The theme’s own consumer of rtMedia’s hook:
| Hook | Owner | Callback | Priority / args |
|---|---|---|---|
rtmedia_single_activity_filter |
rtMedia plugin | buddyx_custom_rtmedia_filter() |
10 / 2 |
Turning the Activity Filter Off
Section titled “Turning the Activity Filter Off”add_filter( 'buddyx_rtmedia_filter_enabled', '__return_false' );Giving the Filter a Real Image Size
Section titled “Giving the Filter a Real Image Size”The filter asks for custom_rtmedia_size, which no code in the theme registers. Register it yourself if you want a sized image rather than the full-size one:
add_action( 'after_setup_theme', function () { add_image_size( 'custom_rtmedia_size', 800, 800, false );}, 20 );Existing uploads need regenerating before the new size exists for them.
Image Sizes the Theme Does Register
Section titled “Image Sizes the Theme Does Register”inc/Post_Thumbnails/Component.php registers buddyxpro-featured, buddyxpro-large, buddyxpro-list, buddyxpro-col-two and buddyxpro-col-three. inc/Image_Sizes/Component.php registers no sizes of its own; it only adds filters.
Template
Section titled “Template”| Path | Role |
|---|---|
rtmedia/main.php |
Full override of the rtMedia main template. Wraps the screen in #buddypress, branches on _bp_theme_package_id and on member versus group context. Prints the theme containers on the BP Nouveau branch only. |
To change the rtMedia screen structure, copy rtmedia/main.php into your child theme and edit it there.
Theme Mods Read by the Template
Section titled “Theme Mods Read by the Template”Read in the BP Nouveau branch only. The legacy branch reads neither.
| Theme mod | Fallback used in rtmedia/main.php |
Values honoured |
|---|---|---|
buddypress_single_member_nav_style |
iconic |
iconic only |
buddypress_single_group_nav_style |
iconic |
iconic only |
CSS Hooks
Section titled “CSS Hooks”#buddypress and #item-body on both template packs. .container, .site-wrapper (with member-home or group-home), .bp-wrap, and .buddyx-nav-iconic when the nav style is iconic, on the BP Nouveau branch only.
Related Settings
Section titled “Related Settings”- BuddyPress Member Profiles - Single member navigation and layout
- BuddyPress Groups - Single group navigation and layout
- BuddyPress Settings - Community configuration
- Activity Stream - Activity display options
Got a question? We’re a friendly team - happy to help.
Documentation: buddyxtheme.com/docs Support Forum: wbcomdesigns.com/support
Email Support: support@wbcomdesigns.com
Include: BuddyX Pro version, rtMedia version, your BuddyPress template pack, and a screenshot of the screen in question.

