[Resolved] How to change the order of the menu items or add a custom menu item with hook

Home Forums Support [Resolved] How to change the order of the menu items or add a custom menu item with hook

Home Forums Support How to change the order of the menu items or add a custom menu item with hook

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #810720
    Yulia

    Hi, I’m using the sliding panel on a site, so the toggle element is the last in the primary menu.
    I need to achieve this look:
    https://dashnexagency.com/contacts/
    where before the toggle there’s a button
    So I tried to float it right – it locates itself after the toggle.
    I’ve tried to add button to the end of the menu through the wp_nav_menu_items filter – no luck, it returns a blank menu.
    Is there a workaround in this situation?
    The feature to locate the item after the toggle would be good.
    Thanks for the help.

    #810729
    Yulia

    I did it, struggled for a few hours and just right after posting here – resolved, with jQuery of course in hook (<script type=”text/javascript”>jQuery(‘#menu-item-49’).insertAfter(jQuery(‘.slideout-toggle’));</script>)
    Gosh so simple

    #810746
    Leo
    Staff
    Customer Support

    Glad you figured out 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.