Membership Plugin. Php command to display subscription ID

I am building a real-estate website that displays a lot of information about each house. I want to use the membership plugin to control what information is shown to different levels of membership. For example, someone who signs up for subscription A can only see information xy on the page, whereas someone signed up to subscription B can see information xyz on the same page.

I know this will be done though if statements, but first I need to know the command to call the subscription ID.

  • sam_skirrow
    • Flash Drive

    Hi Kimberly,

    This was a great idea, however, the content of my page is dynamic content. I tried adding these shortcodes into the php, Something like this:

    $property_price = get_property_price($post->ID);

    <?php echo do_shortcode(‘[level-pay-monthly id=”‘. $property_price . ‘”]’:wink:;?>

    When i’m not logged in it hides the content with the protected content message, however, when I’m logged in nothing shows up…..interestingly, when I’m logged in as admin I see this:

    [level-pay-monthly id=”$13,258.00″]

    Feel like I’m annoyingly close. I understand you can’t offer any custom code support, but any extra advise would be brilliant

    Sam

  • sam_skirrow
    • Flash Drive

    Just to be a little more specific on my question because I feel tantalizingly close, I’m seeing alot about this code here:

    current_user_is_member()

    current_user_on_level($level_id)

    current_user_on_subscription($sub_id)

    And think it is precisely what I need, i’m jut wondering if you could quickly develop on how I would use it to restrict content based on user level id.

    For example, I have this content:

    <?php echo get_property_price($post->ID);?>

    how can I make it so that this is revealed to someone with a level ID of 17?

    Thanks for your help.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.