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

Comments (4)

I’ve tried to implement this fix in the PM pro customisations and it threw up this error:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘my_init_dont_filter_excerpt’ not found or invalid function name in /home/hiphopin/public_html/wp-includes/plugin.php on line 503

I’m having problems with the Avada/Fusion Builder plugin breaking the [membership] shortcode.
Do I need to edit the code to work with this?

This code gist will fix some page builders. Sometimes it doesn’t.

Another option that sometimes works with page builders is to just redirect away from member content instead of filtering it. So if that is okay, you can see how to do that here: https://www.paidmembershipspro.com/redirect-non-members-away-from-member-content/

I haven’t looked into the Avada theme lately. If you give a us a few days (it’s a Holiday weekend) we could look into this via a paid support thread on the site here.

Thanks, I’ve actually got a support thread open on this in the paid support thread, that was escalated to the top level support, but still hasn’t been replied to now for 1 week and 4 days!

The website was supposed to have been set live a week ago, but these incompatibility conflicts are preventing the website from working and being launched. This code above is currently being used on the site to redirect people to a “Sorry members only” page, with links to subscribe and pay for membership, but none of the payment shortcodes or membership pages links are working.
They are all giving 404 errors.

Someone was obviously doing something as my revolution slider at the top of my website vanished, when I logged in to see why, the slider had been disabled.

Please could I get some sort of update as to what is happening?

Leave a Reply

For faster support related to issues on your specific site please open a ticket in our members support area.

Your email address will not be published. Required fields are marked *