Wishlist Member Developers - Advanced Coding Tips

How To Bypass Wishlist Member Protection for Posts or Pages?

Wishlist Member allows you to choose what for which custom post types you want to enable the Wishlist Member protection settings.

If you want to enable the Wishlist Member protection settings for specific custom post type, you can easily do it by enabling it inside Wishlist Member Settings -> Custom Post Type and select the post type you want protect by Wishlist Member protection.

But what can you do if want to exclude the default post types (posts, pages) from Wishlist Member protection.

Achieving that could be a little bit tricky and you need to use some code to enable this functionality.

The function inside Wishlist Member that decide whether or not a specific content will be displayed to a visitor is located inside the wpm.php located in the root folder of the Wishlist Member plugin.

You can disable the function checking by adding a special code at the beginning of them function code and technically tell the function to return the template for the specific content without checking the protection settings.

If you want to disable the protection checking all posts add this code at the beginning of them function:

If you want to disable the protection checking all pages add this code at the beginning of them function:

If you want to disable the protection checking both for posts and pages add this code at the beginning of them function:

If you are using this code and changing the wpm.php file, you should know few things:

  1. Wishlist Member will not support custom or modified code inside the Wishlist Member plugin.
  2. When Wishlist Member will release a new version these changes will be deleted, and you will need to add them again.

If you are looking for more custom solution for Wishlist Member membership site send us a quote request using the request a quote form.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

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