Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Restricted posts are displayed in search (Memberships) › Reply To: Restricted posts are displayed in search (Memberships)
January 19, 2023 at 3:32 pm
#40990
Keymaster
Thank you Josh.
Well, that is rough. Can they suggest anything on how to check if a user/current user has access to a certain post?
With that code I can only check if a user has a certain access level, but I need to check if the user has privileges to a certain post. Something like:
- Get the current user level IDs
- Get the access level IDs for the current post
- Compare and check
I am only guessing as I don’t know their plugin, but there is certainly a way. For example when a user tries to access a post, which is restricted to them – we need to do the same check.