Hi,
You’ll need to install a third party plugin to achieve this. You can try Menu Item Visibility Control which can be found in the WordPress plugin repository for free. Once installed a new field is added to each menu item titled ‘Visibility’ where you can add your own logic.
In your case, for logged in/out, it would be as follows
Logged in only
is_user_logged_in()
Logged out only
!is_user_logged_in()
Plugin: https://wordpress.org/plugins/menu-items-visibility-control/
Codex: https://developer.wordpress.org/reference/functions/is_user_logged_in/
Thanks,
Kieran
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution