Archived topic
nav bar visibility control
6 replies · Started by johnaps on October 4, 2019
Hello!
I am trying to find the right php code to make some items in my menu visible/invisible when logged in and some others visible/invisible when logged out...
I found some plugins that does this like the following "https://wordpress.org/plugins/user-menus/#targetText=The%20plugin%20gives%20you%20more,users%2C%20specific%20user%20roles)."
But they caused problems on my site, and with all the history i have, i dont even want more plugins to be true!
On the secondary navigation i want the 1st item to only be visible on "unlogged users" the 2nd item visible only on "logged in users".
That's it!
And if you know any good sources for me to learn some php for things like these, i would be even more grateful to your lovely support! I am a fan! Hope you all the best!!
Hi there,
It would definitely be easier to find a plugin that works for you instead of creating your own custom solution.
Maybe this one? It has pretty good review:
https://wordpress.org/plugins/login-logout-register-menu/
last update 10 months ago and last review 5 months ago... i really wouldnt want to go that route if possible...
is that something you can help me with?
Thank you!
Also i tested the plugin, and it doesnt do what i want... it simply gives you ready login | logout pages...
i want to have control on what menu items are shown depending on logged in or out condition!
Hi there,
Custom coding this would be quite complicated.
What about one of these?:
https://wordpress.org/plugins/if-menu/
https://wordpress.org/plugins/conditional-menus/
Hi Tom!
Thank you, i ll try them!
You're welcome :)