I would to take nav menu reference (I have id and class) from plugin to theme header.php...How can I do this? I used something like this<?php wp_nav_menu('id'); ?> but of course with failure cause I didn't specific from where I pick this menu...How can I do?

  • Can you explain a little more? Feb 25, 2016 at 15:26
  • I want bring menu function from plugin to theme and use it.
    – Vlad
    Feb 26, 2016 at 11:09

1 Answer 1


wp_nav_menu() doesn't accept a single value for a parameter, it takes an array. Proper format (if you are looking to simply call the menu by ID) would look like this:

        'menu' => $menu_id

I'd recommend checking out the full reference in the codex for more information on the available parameters for displaying a menu.

  • Will it recognize menu from plugin directory?
    – Vlad
    Feb 26, 2016 at 11:10
  • What do you mean by this? What "plugin directory" are you referring to?
    – Ryan
    Feb 26, 2016 at 23:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.