WordPress.org

Ready to get started?Download WordPress

Forums

Nav Menu Roles
[resolved] This breaks my theme's mobile menu... (14 posts)

  1. bruce-s
    Member
    Posted 1 year ago #

    This plugin is exactly what I'm after in terms of functionality, but unfortauntely, it breaks my theme's mobile menu.

    I'm using BuddyPress Corporate and the mobile menu is generated based on screen size when viewing the site...

    For what it's worth, the mobile menu feature is driven from the functions.php file if that helps...

    Any thoughts on fixing or a workaround for this at all?

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

  2. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    The plugin uses a custom Walker to insert checks for user roles. If your theme also uses a custom Walker of its own for specific layout then there will be a conflict, and WordPress will use the Walker that was filtered in last. Since the style is "breaking" I presume it is using my Walker.

    There's no way to make the plugin support every theme out there. This is a known conflict and within the confines of WordPress ( WordPress can only accept 1 Walker argument) I don't think there is much I can do about it.

    As a work-around, the fix for this would be to remove my plugin's filtering of the wp_nav_menu_args... and then customize your theme's Walker to mimic the plugin's role checking.

  3. bruce-s
    Member
    Posted 1 year ago #

    Hi Helga,

    The mobile navigation is now sorted - I had a problem with a conflicting plugin - WordPress Access Control which is now resolved...

    Thanks for your help...

  4. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    Excellent. Yes, first step in debugging is to turn off all other plugins to isolate the problem. Glad it is working for you.

  5. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    Also 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.

  6. bruce-s
    Member
    Posted 1 year ago #

    Hi Helga, thanks for your efforts... you're right, this now works well with the mobile theme which is great...

    However, I'm not sure how to make a page avaliable to everyone and The 'All Logged Out' option doesn't seem to work i.e. when I select this option, the menu item doesn't appear for anyone.

    Does this ring a bell or do you think its another plugin conflict?

  7. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    To display an item to everyone, you select "by role" and then don't check any roles.

    "all logged out" should hide items from logged in users, and display items only to logged out users and guests.

    please let me know if that is not the case and i will try to investigate in the next few days.

  8. bruce-s
    Member
    Posted 1 year ago #

    Thanks for the update... still no joy getting pages to show for public visitors, although it may be due to a plugin conflict (WP Custom Menu Filter Plugin) which I have de-activated...

    When I deactivate the WP Custom Menu Filter Plugin, the menu still appears as it was configured to via this plugin - even after I remove the custom CSS components that it references?!?

    My guess is that this is the problem...

  9. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    Probably? even with the other one deactivated, you still aren't able to show menu items to logged out users?

    unfortunately, I can't promise 100% compatibility with with every other plugin out there... there are just too many.

  10. bruce-s
    Member
    Posted 1 year ago #

    Yeah, not at the moment... I'm not sure why?!?

  11. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    i just tested this, and can confirm it. it must be a bug in the new method i'm using as of version 1.2. i'll have to patch it when i get a chance.

  12. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    nm.... i must be sleep-deprived. i just tested all 3 modes and it works. try clearing your browser cookies?

  13. bruce-s
    Member
    Posted 1 year ago #

    Thanks... I'll dig a bit deeper on my side... what I've got works ok now, but this solution is simpler and easier, especially when there are more members...

  14. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    Ok, let me know what you find out. Cheers.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic