New Landing How can we help? Themeforest Theme Support Dante Menu item visibility

Viewing 15 posts - 1 through 15 (of 16 total)
  • Posted in: Dante
  • #137247
    dinkelgodis
    Member
    Post count: 5

    Hi!

    I wanna adjust the menu item visibility for logged in users and i was planning on using the plugin Nav Menu roles for it. However the hooks you use for your nav menu item settings conflict with this plugin. They have a solution though and i’ll paste it lower down. Do you think you can fix this? πŸ™‚

    Best regards,
    Anna

    Workaround #1
    Shazdeh, the author of Menu Item Visibility Control plugin had the genius idea to not wait for a core hook and simply add the hook ourselves. If all plugin and theme authors use the same hook, we can make our plugins play together.

    Therefore, as of version 1.6 I am modifying my admin walker to only adding the following line (right after the description input):

    <?php
    // This is the added section
    do_action( ‘wp_nav_menu_item_custom_fields’, $item_id, $item, $depth, $args );
    // end added section
    ?>
    I am then adding my fields to this hook. Ask your conflicting plugin/theme’s author to do the same and our plugins should become compatible.

    #137291
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Menu visibility options (logged in/out only) are natively part of the Dante v2.7 – which we are releasing today πŸ™‚

    – Ed

    #147099
    dinkelgodis
    Member
    Post count: 5

    This works great on the computer but not at all for mobile. Do you know why? πŸ™‚

    #147119
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hmm, seems to only be for the main menu, will let the developer know

    – Kyle

    #147122
    dinkelgodis
    Member
    Post count: 5

    Thank you Kyle! πŸ™‚

    #147127
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    No problem πŸ™‚

    #147526
    dinkelgodis
    Member
    Post count: 5

    Did the programmers say anything about when this can be fixed? It’s very important for the functionality of the website I’m working on…

    #147545
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi @dinkelgodis

    Apologies, I missed this – will get it sorted for the next update. If you need it sooner, I can see what I can do about providing an early build for you.

    – Ed

    #148389
    dinkelgodis
    Member
    Post count: 5

    I would love if I could get something as soon as possible πŸ™‚ My client is really stressed out..

    #148392
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Please email Ed using http://themeforest.net/user/swiftideas and provide a link to this topic so that he can provide you with a fixed build

    – Kyle

    #148402
    dinkelgodis
    Member
    Post count: 5

    Done! Thanks Kyle! πŸ™‚

    #148403
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    No problem

    #221190
    webmaster
    Member
    Post count: 2

    Hi,

    We’re using Dante and I do see that you’ve tweaked menus to show/hide based on logged in status.

    However, I really need to show/hide based on whether the user is an Admin or not, which would be possible with the Nav Menu Roles plugin.

    The folks who make the plugin have provided a set of instructions to make themes compatible with it:
    https://wordpress.org/plugins/nav-menu-roles/faq/

    Can you please deploy these fixes so I can get show/hide menu items based on actual role, not just logged in status?

    Or can you please advise on how I can implement this fix myself? I’ve done some functions.php tweaks in the child theme, but I’m not a true WordPress dev – with some guidance I can probably implement myself if need be.

    Thanks!
    Mark

    #221303
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    We just can point you in the correct since customizations like this goes outside our support scope.

    Inside the file custom_walker.php located at dante/swift-framework/sf-megamenu/
    This is the class where the plugin author says the code should be pasted.

    Other option will be to add a specific class if the user is admin or not based on his role, in this same file like it’s done in line 32.

    https://www.dropbox.com/s/ig2jsppforumkx1/Screenshot%202015-10-16%2018.36.25.png?dl=0

    Then with some js the item can be removed on load. Later we can advise you on this if you go with this solution.

    Hope it helps.

    -Rui

    #221330
    webmaster
    Member
    Post count: 2

    Thank you Rui…

    Is there a way I can do this in my child theme so it won’t get overwritten during updates?

    Cheers,
    Mark

Viewing 15 posts - 1 through 15 (of 16 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register