lauras2009
Member
Posted 1 year ago #
I want to be able to show/hide nav sub-items (one level down) if the user is logged in (or not logged in).
I was hoping to be able to put this in the "Insert before item" box:
<?php if ($user_ID != '') { ?>
and this in the "Insert after item" box:
<?php } ?>
but the PHP isn't getting read ... it's just showing up in the HTML as PHP. I do have PHP exec plugin installed so I thought that the PHP would be interpreted ...
Any advice or guidance on this would be much appreciated.
Laura S.
hlwilson3rd
Member
Posted 1 year ago #
I am also trying to use those code blocks. Different utilization, but same result. The code is being ignored. We're you able to resolve this in any way?
lauras2009
Member
Posted 1 year ago #
Well I gave up trying after I realized that the plugin itself pays attention whether the user is logged in or not, so it automatically hides the sub-menu items if the user isn't logged in.
Something I ran into recently makes me think it's worth trying to put the PHP in directly (rather than using the <?php ?> tags (if you're using PHP)
Sorry, that's probably not much help ...
Laura S.