Thanks for posting your solution.
I have tried this work around in a few pages functions.php etc. At best I get a menu line added to the top of the page (not the menu) or more precisely half of a menu of scattered lines (unusable), close though. I have tried using this plugin on a clean install (no plugins) with multiple themes didn’t work. I have tried 4 – 5 other plugins to solve this viability issue they didn’t work. Nor did their work arounds. I have read the know issue report, multiple blogs, FAQ’s… and tried many things that looked simple but no luck but it seems such a simple issue; all I want to do is hide the nav menu to visitors (not logged in). Can anyone suggest a clean little line of php and where to add it or a work around that I can actually get working. Day 3 on what seems to be a 5 minute solution 🙁
Thank you,
Have you read my FAQ? In Workaround #1, it attempts to walk you through where to put the 1 line of code which needs to be added to your theme to ensure compatibility. I can’t tell you what file and line number exactly because I don’t know your theme, the FAQ walks you through how to find where.
IF you still can’t find that, you can try Workaround #2 which is just to switch to a default theme (twenty fifteen), set the nav Menu roles meta (in the wp-admin, this is *not* yet part of the customizer!, and then revert to your non-compatible theme.