• Running PaidMembershipsPro 1.7.11, disabled all other plugin and leave only PMP. For the whole posts that are protected by PMP, it shows correct information regular visitor: “This content is for …… “

    But for part of the content inside a post that is protected by [membership] shortcode, it shows nothing but blank.

    I’ve tried to switch “Filter Searches and Archives” to “No” option suggested in another post, (although I must use “Yes” instead of “No”), it didn’t work.

    Any suggestion?

    https://wordpress.org/plugins/paid-memberships-pro/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Sorry for the confusion. The [membership] shortcode actually is only used to hide/show content to certain members, not necessarily “restrict” it in the same way that the “Require Membership” box does for an entire post, showing the restricted message, register/login buttons, etc..

    However, if you are comfortable with code, you could create a custom shortcode to add that as well by filtering any content through the the_content filters which PMPro uses to restrict content that way.

    If you need further help with this, please consider becoming a PMPro member for our member support forums.

    Thread Starter 2bearstudio

    (@2bearstudio)

    This is very interesting. Thank you for clearing it up.

    First time use PMP, I didn’t know what should it look like, but pointed to my client why there is blank. The client told me there was some message (like “This content is for …”), and he didn’t know why, when and how became blank.

    Anyway, I found the code in membership.php, and hacked with my own message. Just wonder, if it is a good idea to add a hook there for developer to add custom information there.

    Actually, hacking the core plugin files is generally a bad idea because those changes will be overwritten when you update the plugin. An easier way to handle this would be to simply use the same [membership] shortcode to display a message to non-members as well. For example:
    [membership]
    This is restricted content only members will see.
    [/membership]
    [membership level=0]
    Non-members will see this content.
    [/membership]

    Does that make sense?

    Thread Starter 2bearstudio

    (@2bearstudio)

    It make sense, and the solution works. But not the best solution.

    1. There are over 175 posts for me to add this extra shortcode. It is not practical.

    2. This is a repeated result, should be considered to be included in the plugin. Not leave it to the user.

    3. It makes total sense to display the “Non-members will see this content” at first place, instead of leaving it blank.

    The intended use of the shortcode is simply to give users the ability to hide and display different content depending on membership level. If you want, you can create your own [my_membership] shortcode by copying and modifying the functions to your own active theme’s functions.php file or customizations plugin.

    If you need further help, please consider becoming a PMPro member for our member support forums.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Blank Message for Non-member’ is closed to new replies.