WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Navigation List Plugin NAVT
php in before/after? (3 posts)

  1. lauras2009
    Member
    Posted 3 years 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.

  2. hlwilson3rd
    Member
    Posted 3 years 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?

  3. lauras2009
    Member
    Posted 3 years 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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic