Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Conditional content by member level

by

Tips and Tricks HQ Support Portal › Forums › WP eMember › Conditional content by member level

Tagged: conditional content, eMember, protected post

  • This topic has 5 replies, 2 voices, and was last updated 14 years, 3 months ago by amin007.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • January 27, 2011 at 6:32 am #2585
    Mike welling
    Member

    Hi I’ve look at the protect section by member level

    from what I can tell i can only setup up:

    if membership level = silver then display content x

    else – display error message

    I would like to answer the particular issue:

    if membership level = silver then display content x

    if membership level = gold then display content y

    if membership level = platinum then display content z

    etc…

    Could you please let me know shortcode or php function to allow me to do so

    Thanks

    Mike

    January 28, 2011 at 3:25 am #28435
    amin007
    Participant

    We cannot design a shortcode where there can be a large number of inputs. We need to have defined inputs. In your case if someone has setup 50 Membership levels the shortcode will have to take 50 inputs which is not ideal.

    This is what you can do. Use the section protection and list the content of each membership level like the following:

    Content for Membership Level X

    [emember_protected for=1]

    Content form level x goes here

    [/emember_protected]

    Content for Membership Level Y

    [emember_protected for=2]

    Content form level y goes here

    [/emember_protected]

    Content for Membership Level Z

    [emember_protected for=3]

    Content form level z goes here

    [/emember_protected]

    etc…

    Now a member will only be able to view the section for his/her membership level.

    January 30, 2011 at 10:55 pm #28436
    Mike welling
    Member

    @amin007 – thanks for the tip it worked great. Only thing I need to figure out now is to hide the protected content message so it would display only the content for each member level and not the content for current member level & error message for each section. Any tips would be appreciated.

    January 31, 2011 at 5:42 am #28437
    amin007
    Participant

    You can find that line in the language file and customize it so it read better. This post will explain what to do:

    https://support.tipsandtricks-hq.com/forums/topic/how-to-customize-various-textmessages-displayed-by-the-plugin

    February 1, 2011 at 1:41 am #28438
    Mike welling
    Member

    Thanks for the article.

    I changed the language file to be ‘blank’ for this particular case.

    However, what I’m seeing is 2 breaks included above the content per member level.

    So if I have 8 member levels (currently) & happen to be member level 8 then the section gets pushed down 16 lines from the top.

    Is there a way to not display an error message rather than change language that is displayed.

    Thanks

    Mike

    February 1, 2011 at 4:41 am #28439
    amin007
    Participant

    Open “wp_eMember1.php” file and search for the followoing:

    $replacement = '<a '. $join_url .' ><b>'.EMEMBER_MEMBERS_ONLY_MESSAGE.'</b></a>';

    Once you find it change it to the following:

    $replacement = '';

    That might do the trick.

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ