Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save strangerstudios/a9ed75ba4cbbf545644f to your computer and use it in GitHub Desktop.
Save strangerstudios/a9ed75ba4cbbf545644f to your computer and use it in GitHub Desktop.
Tell PMPro to filter the content a bit later.
/*
Tell PMPro to filter the_content a bit later.
This will sometimes fix issues where theme or plugin elements (e.g. videos)
are not being filtered by PMPro. Note that this sometimes will cause
some things (e.g. share links) to be filtered that you don't want to be
filtered... and sometimes edits to the theme or a child theme are
required to get the desired effect.
Add this to your active theme's fucntions.php or a custom plugin.
*/
function my_init_change_pmpro_content_filter_priority()
{
remove_filter('the_content', 'pmpro_membership_content_filter', 5);
add_filter('the_content', 'pmpro_membership_content_filter', 15);
}
add_action('init', 'my_init_change_pmpro_content_filter_priority');
@laurenhagan0306
Copy link

This recipe is included in the blog post on "Filter Members Only Content Later (for Page Builders and Certain Plugin Conflicts)" at Paid Memberships Pro here: https://www.paidmembershipspro.com/filter-members-only-content-later-for-page-builders-and/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment