For developers who need to customize the Add On beyond its settings, the bbPress Integration Add On offers filter hooks to change where non-members are redirected, change the no access message, and control its search filtering.
Add custom code to your site using the PMPro Customizations plugin or the Code Snippets plugin.
Filters
pmprobbp_check_forum_redirect_url
Filters the URL a user is redirected to when they try to view a restricted forum or topic without access. By default, this is your forums index with ?noaccess=1 added, which shows the Error Message setting. The Add On uses this filter itself (at the default priority of 10) to send users to the BuddyPress Access Restricted page when one is set, so use a later priority such as 20 to override it.
apply_filters( 'pmprobbp_check_forum_redirect_url', string $redirect_to, int $forum_id );
Parameters
$redirect_to: string; The URL to redirect the user to.$forum_id: int; The ID of the restricted forum the user tried to view.
pmpro_bbp_error_msg
Filters the message shown on the forums index after a user is redirected away from a restricted forum. The same message is shown as the error when a user without access tries to post a new topic or reply in a restricted forum. The Add On uses this filter itself (at the default priority of 10) to return the Error Message setting, so use a later priority such as 20 if your code should override that setting. In most cases, changing the Error Message setting is all you need.
apply_filters( 'pmpro_bbp_error_msg', string $message );
Parameters
$message: string; The no access message. The Add On sets this to the Error Message setting, which defaults to “This forum is for members only.”
pmprobb_filter_forum_queries
Determines whether the Add On adds its query filter to hide restricted forums, topics, and replies from front-end forum lists, topic and reply lists, feeds, and bbPress search results. The query filter only hides content when the Add On’s Hide Member Forums setting is enabled. It doesn’t depend on the Filter searches and archives? setting in Memberships > Settings > Advanced. Return false to turn off this filtering. bbPress search results are still filtered unless you also return false from pmprobb_filter_topic_queries.
apply_filters( 'pmprobb_filter_forum_queries', bool $filter_queries );
Parameters
$filter_queries: bool; Whether to add the query filter. Defaulttrue.
pmprobb_filter_topic_queries
Determines whether the Add On filters bbPress search results pages when pmprobb_filter_forum_queries returns false. While the main query filter is on (the default), this hook isn’t used. Like the filter above, it only hides content when the Hide Member Forums setting is enabled. Return false to leave bbPress search results unfiltered.
apply_filters( 'pmprobb_filter_topic_queries', bool $filter_queries );
Parameters
$filter_queries: bool; Whether to filter bbPress search results. Defaulttrue.
Get Support From Our Team of Experts
Have a question about how to use this feature? Our Support Page outlines three ways to get support.
Our Max plans include hands-on help customizing your membership site and implementing new features. Upgrade to PMPro Max now »
Last updated on November 12, 2026

