• Resolved Avi

    (@avi143)


    hi,,

    i just want to get post membership level in my loop. can anyone tell me how to get the post membership level ?

    i just want to get post membership lvl inside my post while loop.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Andrew Lima

    (@andrewza)

    Hi @avi143,

    Thank you for using Paid Memberships Pro.

    You are able to get a list of category ID’s (in an array) by passing a particular level ID to pmpro_getMembershipCategory( $level_id );

    This will return all category ID’s that a particular membership has access to. You should be able to get a list of all category ID’s for all your membership levels and cross reference this.

    I hope this helps, you may then include this in your query according to the posts category.

    Plugin Author Andrew Lima

    (@andrewza)

    Alternatively you should be able to query against the _pmpro_memberships_pages table to retrieve a membership level ID according to the page ID.

    • This reply was modified 9 years, 2 months ago by Andrew Lima.
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘how to get post Membership level’ is closed to new replies.