Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact

[Support request] get membership level from post to compare with user

Simple Membership Plugin › Forums › Simple Membership Plugin › get membership level from post to compare with user

  • This topic has 1 reply, 2 voices, and was last updated 8 years, 4 months ago by The Assurer.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • July 5, 2018 at 2:08 pm #14855
    denthis
    Participant

    Hi,
    I try to get the membership level from a page to compare active users members level with the members level of some pages in a loop.

    Like:

    $args = array(
    ‘post_parent’ => $post->ID,
    ‘post_type’ => ‘page’,
    ‘orderby’ => ‘menu_order’
    );

    $child_query = new WP_Query( $args );

    $member_level = SwpmMemberUtils::get_logged_in_members_level();

    while ( $child_query->have_posts() )
    {
    $child_query->the_post();

    if (“something like post members_level” == $member_level)
    {
    echo ‘<h3>’ . get_the_title() . ‘</h3>’;
    }
    }

    Has anyone an idea how to do this?

    Thanks,
    Dennis

    July 5, 2018 at 10:19 pm #14856
    The Assurer
    Moderator

    I try to get the membership level from a page to compare active users members level with the members level of some pages in a loop.

    Sorry, I don’t understand the question.

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

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy