Support » Fixing WordPress » wp_nav_menu: How to add sub items to parent item with add_filter?

  • Hi,

    Let’s say have setup the following menu in wordpress.

    Item-1
    — Subitem-1-1
    — Subitem-1-2
    Item-2
    Item-3

    How can i add Subitems to Item-2 by using add_filter?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    As far as I know you can add sub-menu items in the menu screen if the theme supports nav menus – which just about all do. Or are you trying to add a random item? If that is the case one possible way I can think of would be using a custom walker class.

    Hi,

    Yes i know about the option to add sub-menus from menu screen. But i need to inject some dynamic links under Item-2. I have looked at walker class, but could not find a solution to inject submenus.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp_nav_menu: How to add sub items to parent item with add_filter?’ is closed to new replies.