Support » Plugin: Paid Memberships Pro » Code to hide title of posts of membership category

  • Resolved richard12

    (@richard12)


    Hi,
    1.
    As I test the plugin I see that posts that are in membership categories appear with the title and then below the register button. I need the title not to viewable and to only have the register button on posts in a membership category. Is there a code snippet that one can wrap the title in like, if membership blah, then blah if not blah.

    2. I also notice that if I navigate to a membership category I get a nothing found page. It is not the 404 page. I wonder if there is the possibility of the category also of having a register button.

    Thanks in advance
    Richard

Viewing 1 replies (of 1 total)
  • Plugin Author Andrew Lima

    (@andrewza)

    Hi @richard12,

    Thank you for using Paid Memberships Pro.

    1.
    As I test the plugin I see that posts that are in membership categories appear with the title and then below the register button. I need the title not to viewable and to only have the register button on posts in a membership category. Is there a code snippet that one can wrap the title in like, if membership blah, then blah if not blah.

    You are able to hook into the_title and remove it if the user currently doesn’t have access to a particular membership level. Alternatively, you are able to adjust your theme templates and make use of the pmpro_hasMembershipLevel() function. For more information on these functions, please have a look at this documentation: https://www.paidmembershipspro.com/documentation/content-controls/

    2. I also notice that if I navigate to a membership category I get a nothing found page. It is not the 404 page. I wonder if there is the possibility of the category also of having a register button.

    Currently we don’t have a solution for this, I would recommend in redirecting members away from these category pages to a signup/landing page to signup for a membership level. Here’s how you can redirect non-members away from restricted content – https://www.paidmembershipspro.com/redirect-non-members-away-from-member-content/

    I hope this helps get you started.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.