1. Home
  2. Knowledge Base
  3. Customizations
  4. PHP Functions
  5. How to Remove the Moderation Component Pop-up on MemberPress Pages

How to Remove the Moderation Component Pop-up on MemberPress Pages

Introduction

The BuddyBoss Moderation component pop-up is rendered across the site, including MemberPress pages. Currently, there is no built-in option to exclude MemberPress course or lesson pages from loading this pop-up. You can resolve this by adding a custom function that prevents the moderation pop-up from rendering on specific MemberPress post types. This guide explains how you can remove the moderation component pop-up on MemberPress Pages

Custom Workaround

Before proceeding, make sure you have a complete site backup.

  1. Go to Appearance > Theme Editor in your WordPress admin dashboard.
  2. Under Select theme to edit, choose your active theme (preferably BuddyBoss Child Theme), then click Select.
  3. From the Theme Files list, click Theme Functions (functions.php).
  4. Paste the following code just before the closing PHP tag (?>):
add_filter( 'template_redirect', 'remove_moderation_popup_on_memberpress_course' );
function remove_moderation_popup_on_memberpress_course() {

    global $post;

    if (
        $post instanceof WP_Post &&
        (
            'mpcs-course' === $post->post_type ||
            'mpcs-lesson' === $post->post_type ||
            'memberpressgroup' === $post->post_type
        )
    ) {
        if ( is_single() || is_post_type_archive( 'mpcs-course' ) ) {
            remove_action( 'wp_footer', 'bb_moderation_content_report_popup' );
        }
    }
}
  1. Click Update File to save your changes.

Note: Modifications are typically considered custom work, but we are making an exception in this case. Please review the BuddyBoss Support Policy.

Troubleshooting and FAQs

Q: The moderation pop-up still appears on MemberPress pages.
A: Confirm the page is using one of the supported MemberPress post types (mpcs-course, mpcs-lesson, or memberpressgroup) and clear any site or browser cache.

Q: Will this affect moderation pop-ups on other pages?
A: No. This workaround only removes the pop-up on the specified MemberPress pages.

Q: Can I add more post types to exclude?
A: Yes. You can include additional post types in the conditional check within the function.

Q: Can I revert this change easily?
A: Yes. Remove the code from functions.php and save the file.

Q: Who can I contact for further assistance?
A: Please review the BuddyBoss Support Policy or consult a developer for custom work.

Was this article helpful?

Related Articles

Subscribe to Our Newsletter

Stay In Touch

Subscribe to our Newsletter, and we’ll send you the latest news from BuddyBoss

  • This field is hidden when viewing the form
  • This field is for validation purposes and should be left unchanged.

To speak to our Agency consultant, fill in the form found at our Contact Page.

  • Get Started

    Enter your name and email address to get started with your project...

  • This field is for validation purposes and should be left unchanged.