Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Restrict Results Based on Paid Memberships Pro Level › Reply To: Restrict Results Based on Paid Memberships Pro Level
June 21, 2024 at 2:28 pm
#48537
Keymaster
Thanks!
The pmpro_hasMembershipLevel looks promising, but still need a way to check what level the current content is. I guess each post/item has a level and there is some way to retrieve that by the post ID?
With that a possible solution would be to:
– go through all the results in a loop
– get the access level of the post by it’s ID
– check if the user has access to that level
– remove it from the results if not
The only thing missing here is how to get the content level by it’s ID.