Hello
I want to use some PHP code to a. restrict access to posts and b. create a navigation menu for the non-restricted posts.
My code is tested and works fine but I thought to use hooks for that.
I would like to use some variables from the main code/hook that restricts pages according to some things in the second code/hook that shows the links for the non-restricted pages (…before_right_sidebar_content).
I have tried, but it seems that the variables from one hook are not seen in the other hook.
I’m relatively beginner to WordPress and don’t know if these variables are supposed to be seen from one hook to another as globals, or so.
Is any solution to this that you can indicate to me, or should I look for a developer?
Thank you.