• For some reason I can’t get my wp_nav_menu to return the code rather then echo it. I’ve tried various ways of getting it to work:

    $shop_nav = wp_nav_menu( array( 'echo' => '0', 'container_class' => 'menu-shop', 'theme_location' => 'shop') );

    $shop_nav = wp_nav_menu( array( 'echo' => 'false', 'container_class' => 'menu-shop', 'theme_location' => 'shop') );

    $shop_nav = wp_nav_menu( array( 'echo' => 0, 'container_class' => 'menu-shop', 'theme_location' => 'shop') );

    $shop_nav = wp_nav_menu( array( 'echo' => false, 'container_class' => 'menu-shop', 'theme_location' => 'shop') );

    Has anyone else had this problem?

  • The topic ‘wp_nav_menu echo problem’ is closed to new replies.