Support » Plugin: Paid Memberships Pro » Shortcode to show or to hide content

Viewing 10 replies - 1 through 10 (of 10 total)
  • Oh I found it out myself..

    [membership level=”1″]Will only show up for level 1 users[/membership]

    [membership level=”-1″]Will show up anyone not in level 1, including non-members[/membership]

    [membership level=”0″]Will show up for non-members.[/membership]

    But how to use it in sidebar widgets!?

    Well I found it out myself!

    <?php if (pmpro_hasMembershipLevel(3) ) { //only members can see this ?>
    <?php } ?>


    AWESOME! I’ve been looking for this for hours!


    this seems to be exactly what i was looking for also!! and you figured it out on your own!! man, you are just all kinds of awesome! Thank you!!

    You can use in your widget area if your theme allows shortcodes in your widget area. If not you can add the following to your theme’s functions file:

    add_filter(‘widget_text’, ‘do_shortcode’);

    This should allow you to use any shortcodes in your widget areas, not just PMPro’s.

    I’m using Kallyas theme, and most of the pages I use are widget based, however… PMP will properly hide the page static content, but not the widgets used on the page.

    Any help would be greatly appreciated.

    Hi Mad Coder

    Use the shortcodes to hide content within the widget areas.

    If you would like more guidance or hands on help implementing this solution with Paid Memberships Pro, please sign up at

    Or MadCoder, you could use the php template code to hide the sidebar widget entirely based on the viewer’s membership level. It works great. Put the code into your sidebar template file.


    Hi guys,
    What is the shortcode to make the content to show up for members level 1A and 1B?


Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Shortcode to show or to hide content’ is closed to new replies.