Detect if page is part of hidden menu
-
Is there a way, that I can programmatically check to see if a page is part of a menu that is only available to logged in users?
My plan is as follows: If the member is not logged in, they can’t even see the menu item. That’s standard nav-menu-roles behaviour. But if they are logged in but not paid, I want them to see the menu item, but not see the content of the page.
I know how to set up a hook in functions.php. All I need to know is what to check how to see if the page that is about to be displayed belongs to a menu that is configured to be hidden from logged out users. Where in the database is that menu configuration information stored and how can I read it and use it?
- The topic ‘Detect if page is part of hidden menu’ is closed to new replies.