Filter Members Only Content Later (for Page Builders and Certain Plugin Conflicts)

Our plugin filters your members-only content using WordPress’ the_content template tag. Occasionally, certain themes and plugin elements also filter on this template tag, which can result in improper/unexpected members-only content filtering. The code recipe below can help resolve this by running the PMPro filter later.

By default, we run our filter on the_content at priority “5”. So, if you are able to locate where your plugin/theme/page builder is filtering the_content, you’ll know how much you need to increase the priority of the pmpro_membership_content_filter.

Note: Live Composer filters on the 101 priority, so you must increase your priority to a higher value than 101.

Special Notes

Increasing the priority of the filter will sometimes cause certain elements (e.g. “share” links) to be filtered that you don’t want to be filtered. In this case, edits to your theme, child theme, or filters on the third-party plugins used are required to get the desired effect. Open a topic in our members-only forum for support with filters and theme or plugin conflicts.

Need help on how to add this code to your site?

Watch our video on creating a PMPro Customizations Plugin and see how we add this specific code snippet to our customizations plugin here.

As a PMPro Plus Member get hands-on support via our Member Support Forms. Open a topic in our members-only forum for support with filters and theme or plugin conflicts.

Our recommended method of utilizing a snippet like this is to copy and paste this code into a helper PMPro Customizations plugin.

Running the PMPro (Checkout, Billing, Cancel/etc) Shortcodes Later

We’ve also run into themes and plugins that run special formatting filters on the the_content hook which can interfere with how PMPro generates its HTML and JavaScript code on pages.

The gist below can be used to force WP to process the PMPro shortcodes later on, after any other formatting filters are already run. Again, the priority of how these functions are fired may need to be tweaked to achieve the desired effect. We can help in the member forums.

Copy and paste this code recipe into a helper PMPro Customizations plugin.

Read more about: WordPress Filters and Paid Memberships Pro Filters