This topic has 19 replies, 8 voices, and was last updated 9 years by Abe.

  • Author
  • #20454
     amine
    Participant

    Hello

    I have install plugging nav-menu-roles to have control on the menu navigation for different user role http://wordpress.org/plugins/nav-menu-roles/.

    however I am getting the following error

    Nav Menu Roles has detected a conflict with the following functions or classes: kleo_custom_menu. Please see the FAQ for more information.

    I look forward for your help.

    Thank you

    #20677
     Abe
    Keymaster

    Hi, yes we used some customizations to the default menu settings for the Mega menu option. If you want to disable add this code in your child theme functions.php

    COPY CODE
    
    add_action('after_setup_theme', 'kleo_remove_mega_menu', 11);
    function kleo_remove_mega_menu() {
      remove_theme_support( 'kleo-mega-menu' );
    }
    

    Also until 1.5.1 version replace these two file contents with the ones attached:
    – wp-content/themes/kleo/functions.php
    – wp-content/themes/kleo/lib/theme-functions.php

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    Attachments:
    You must be logged in to view attached files.
    #20808
     marceldennisxp
    Participant

    For the next update can you make this plugin work with your kleo mega menu? I also have this plugin installed which is giving me the same error and would love to be able to show menu items by user role.

    #20935
     Abe
    Keymaster

    We will take a look at it. Right now KLEO is compatible with https://wordpress.org/plugins/menu-items-visibility-control/

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #20946
     marceldennisxp
    Participant

    Great! Thanks for the suggestion but I will wait for the nav menu plugin compatibility since it’s easier and has more menu functions.

    #21509
     Patagonia
    Participant

    It seems they changed it to have both plugins work together, see
    http://wordpress.org/support/topic/does-this-work-with-nav-menu-roles-plugin?replies=13

    Do they both work now with Kleo? Might need to test the dev version from github.

    Cheers

    #21510
     Patagonia
    Participant

    See also the updated faq: http://wordpress.org/plugins/nav-menu-roles/faq/
    KLeo team, it states:

    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):

    COPY CODE
    <?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.

    So some work on your side might be needed.

    #21552
     marceldennisxp
    Participant

    @patagonia I have the 1.6 version and yes you are correct that the author has to make adjustments on his end for the nav menu plugin to work with the mega menu. Right now I still get an conflicting error unless I disable the mega menu which I don’t really want to. On the other hand the nav menu role plugin would solve tons of users issues with redirects…menu visibility both desktop & mobile etc… This is a very simple but powerful plugin that needs to be compatible with this theme.

    #21655
     Abe
    Keymaster

    Hi there, we added an action like @patagonia suggested here http://wordpress.org/plugins/nav-menu-roles/faq/ and seems to work.

    Please replace the contents of this file until the next update with the content from the the one attached to fix it.

    wp-content/themes/kleo/lib/menu-custom.php

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    Attachments:
    You must be logged in to view attached files.
    #21678
     marceldennisxp
    Participant

    Great!

    #22189
     Sriahciboon
    Participant

    Just posting to confirm this does work!

    #22199
     Abe
    Keymaster

    Super. Thanks for your feedback

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #22658
     Mj
    Participant

    Confirmed, it’s working.

    #23380
     jwgarrett
    Participant

    It works for everything except custom menu types. Can you get it to work for the custom menu types as well?

    Attachments:
    You must be logged in to view attached files.
    #23393
     Abe
    Keymaster

    Try with v1.6.1 coming tomorrow and see how it goes

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #23450
     Kieran
    Participant

    Hi,

    Can I just confirm exactly what I should put into the child theme functions to get nav menu roles to work?

    Thanks.

    #23454
     Kieran
    Participant

    Ignore me, I was being dumb. Sorted it.

    Thanks.

    #23544
     jwgarrett
    Participant

    I have installed 1.6, but still having the same issue. How did you sort it out Kieran?

    #23546
     Kieran
    Participant

    This https://archived.seventhqueen.com/forums/topic/conflict-with-the-following-functions-or-classes-kleo_custom_menu/#post-20677 added to theme functions in child theme worked a treat for me.

    Either by logged in, logged out or role

    #23554
     Abe
    Keymaster

    in 1.6 the nav-menu-roles plugin should work without code intervention since the change given by me to menu-custom.php it is included in the update

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

Viewing 20 posts - 1 through 20 (of 20 total)

The topic ‘Conflict with the following functions or classes: kleo_custom_menu’ is closed to new replies.

Log in with your credentials

Forgot your details?