WordPress.org

Ready to get started?Download WordPress

Forums

Nav Menu Roles
[resolved] Exactly what 'm looking for, but...... (13 posts)

  1. NumberPress
    Member
    Posted 1 year ago #

    This is exactly what I need.

    Plugin installs fine.

    Check boxes are visible.

    Menu items do not disappear for non-logged in users.

    Same issue when displaying based on users role. Menu item remains visible.

    I am only using five other plugins (none menu related). I disabled the menu widget, but that did not help either.

    Suggestions?

    http://wordpress.org/extend/plugins/nav-menu-roles/

  2. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    The odds are that your theme is using a custom Walker to display the menus. You can verify this by switching to Twenty Eleven briefly.

  3. NumberPress
    Member
    Posted 1 year ago #

    Worked like a charm in Twenty-Eleven.

    I use Artisteer to build my themes. If they use a custom walker, am I out of luck, or is there a way to make the two work together?

    Thanks

  4. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    You can probably make the two work together with some custom code. Most likely you will have to duplicate their Walker, add my plugin's role checking (which can be seen in inc/class.Nav_Menu_Role_Walker.php) and then filter the new Walker into the wp_nav_menu_args.

    I'd like to add this to my FAQ because it is the one problem that pops up consistently but I haven't been able to look into this very much. And even if I did, it is likely to be different for each theme using a different custom Walker.

  5. NumberPress
    Member
    Posted 1 year ago #

    That is most likely beyond my abilities. However if you would like my theme so you can dissect it for future releases, let me know.

    Thanks,

  6. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    It is also a little bit beyond what I can do quickly to give you a work around today. It is going to be a messy solve. As I said, it will probably be a little different for each theme too. It is a limitation with WP, you just can't apply multiple Walkers.

  7. NumberPress
    Member
    Posted 1 year ago #

    I certainly wasn't asking you to fix it today, but if you need an Artisteer theme to look at the code for future development, let me know.

    Thanks,

  8. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    No worries. There really isn't anything I can do in my plugin to accommodate this, but it'd be nice to figure out a suggestion for the FAQ, since this problem pops up with other themes.

  9. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    Please check out the 1.2 update. It uses an alternative method of restricting the menu items and will no longer conflict with a theme or plugin's custom nav Walker.

  10. NumberPress
    Member
    Posted 1 year ago #

    Works like a charm.

    Thank you for your hard work, creativity and knowledge.

  11. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    Great, glad that it works for you. I didn't think it could be done, but all credit goes to Evan Stein for approaching the problem a different way and coming up with the solution.

  12. cynthusia
    Member
    Posted 1 year ago #

    Hi,
    I installed 1.3.1 and am having the same problem described above. My theme is based off of the wp-Bootstrap theme by 360, and I switched to Twenty Twelve, deactivated ALL plugins, but the problem persisted. Any suggestions?

  13. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    @cynthusia - I had a stupid bug that wasn't saving the menu roles info. Today was not a good day for updating! 1.3.2 should be saving the roles now, which I hope was the cause of your problem. I just tested it with Twenty Twelve and it seems fine.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.