• https://ibb.co/Hgh8kQs

    I have a Menu Option Default Menus. I want to take all of it’s items will go to right menu section on loading our website. No need to click Add Menu button. Automatically shifting these menus to our main navigation.

    If anyone didn’t setup his menu, also these menus will be automatically loaded to the right section for the top bar.

    Is it possible to do?

    Thanks

Viewing 1 replies (of 1 total)
  • Hi,
    In WordPress menu has been rendered by this function wp_nav_menu(). In this function along with other arguments, you can use 'fallback_cb'. Use any function as its value. If the menu doesn’t exist, this function will fire. The default value of this argument is: 'wp_page_menu' which displays or retrieves a list of pages with an optional home link.

    If you want to have your own menu items before setting the menu, just write your own function which returns a list of items, and use that function as a value of the 'fallback_cb' argument.

    You can get full docs from here:
    https://developer.www.ads-software.com/reference/functions/wp_nav_menu/

Viewing 1 replies (of 1 total)
  • The topic ‘How to load some menu before setting his menu properly?’ is closed to new replies.