- This topic has 1 reply, 2 voices, and was last updated 8 years, 4 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
WordPress Membership Plugin
Simple Membership Plugin › Forums › Simple Membership Plugin › get membership level from post to compare with user
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
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.