Create a Widget Area in the Navigation Bar for the Genesis Theme Framework?

You are adding filter, not an action. I don’t know how Genesis hook works, but native wp_nav_menu_items passes (and expects back) markup of custom menu items.

Instead of echoing your additional stuff you should append it to input and return.

This is clearly how it’s done in tutorial you linked to:

add_filter('wp_nav_menu_items','follow_icons',10,1);
function follow_icons($output) {
    $follow = 'some stuff';
    return $output.$follow;
}

Upd. Forgot to add about sidebar part. Since sidebars are echoed by definition you will likely have to buffer its output to use in such fashion. Maybe instead of making widget ares literally inside menu it is better to look for hook that allows to do this nearby?

Leave a Comment