Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter pazis

    (@pazis)

    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!?

    Thread Starter pazis

    (@pazis)

    Well I found it out myself!

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

    Thread Starter pazis

    (@pazis)

    RESOLVED!

    rwilki

    (@rwilki)

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

    Thanks,
    Bob

    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 http://www.paidmembershipspro.com/pricing.

    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.

    Thanks,
    Bob

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

    Thanks.

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