Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author shazdeh

    (@shazdeh)

    The two plugins offer the same functionality, no? πŸ™‚
    I’ve written a piece here explaining the issue: http://shazdeh.me/2014/06/25/custom-fields-nav-menu-items/

    Thread Starter master412160

    (@master412160)

    I’m not sure.

    It can’t display a menu based on the location.

    Just on usergroup and logged in or not.

    I would like to use both your and his plugin.

    Isn’t that possible?

    Plugin Author shazdeh

    (@shazdeh)

    The Menu Item Visibility Control plugin supports both, you can use conditional tags (http://codex.wordpress.org/Conditional_Tags) to display a menu item based on location, and you can hide/show menu items based on user groups and login status, please see the plugin’s page for examples: https://wordpress.org/plugins/menu-items-visibility-control/

    Thread Starter master412160

    (@master412160)

    Okay but I would use your plugin more for is_home stuff and the usergroups I don’t know how to type all that conditional stuff.

    I’m not that technical.

    I rather select some option then having to type the code each time for is administrator or is author if that is even the code.

    Can’t you make this work with the other plugin?

    The other plugin is more user friendly to use for what it offers.

    And for the advanced stuff like is_home I would plan on using your plugin.

    Really much kudos if you can make this happen.

    Plugin Author shazdeh

    (@shazdeh)

    I agree, the plugin is geared more toward techi- users. Please check this plugin: http://themify.me/conditional-menus, it offers the ability to swap entire menus based on both location and user groups, and it has a nice UI.

    Thread Starter master412160

    (@master412160)

    Alright but that plugin is for the whole menu and not for menu items.

    So still not the perfect plugin for me….

    Though I suppose it could work.

    I guess it might be to much to ask for making your plugin work with the other one because of the many other options around that are alike.

    Plugin Author shazdeh

    (@shazdeh)

    It’s not that I don’t want to, but that WordPress does not support having both plugins work at the same time. πŸ™ I’ve explained the issue in the blog post linked above, the only solution I have found requires an update on the nav menu roles plugin.

    Thread Starter master412160

    (@master412160)

    I’ll post a support topic then at the support forum of that plugin author.

    No, this isn’t something that I can fix in Nav Menu Roles. This is the #1 question/support request I receive for NMR and unfortunately there is nothing I can do about it.

    This comes down to the fact that WordPress’s core does not have hooks in the WordPress admin menu section so the only way to modify the menu item form information is with a custom Walker. If your plugin is also using a custom Walker by filtering wp_edit_nav_menu_walker then our plugins cannot work together.

    For a more detailed explanation please see my FAQ.

    Plugin Author shazdeh

    (@shazdeh)

    @helgatheviking: one way around that is to use an action hook inside the custom walker to include the custom fields, if we both use the same action hook then the two will be compatible. Please see this post: http://shazdeh.me/2014/06/25/custom-fields-nav-menu-items/

    That’s a clever idea and I would be open to it. If you sent me a pull request that would speed things along: https://github.com/helgatheviking/nav-menu-roles

    but otherwise, I will try to add it when I can.

    One caveat though: Too many fields and/or too many menu items can put people into trouble with the following ticket issue:
    https://core.trac.wordpress.org/ticket/14134

    Which is actually the ticket holding back the addition of an official hook.

    Never mind. I have made the adjustment in the dev branch. @max Pen, can you check that the plugins work together?
    https://github.com/helgatheviking/nav-menu-roles/tree/dev

    Do these two plugins now work together? How does one write in the conditional tag for meeting two conditions: Say I want if page is my-page and user is logged in?

    Plugin Author shazdeh

    (@shazdeh)

    With the Menu Item Visibility Control plugin you can simply write:

    is_page( 'my-page' ) && is_user_logged_in()

    This checks if we’re on the “my-page” page (see here to learn more about conditional tags: http://codex.wordpress.org/Conditional_Tags) and the user is logged in.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Not working with nav menu roles plugin?’ is closed to new replies.