• Resolved kriskl

    (@kriskl)


    HI Jared,

    I am trying to get for all bppress forums/topics load conditionally bbpress_custom menu, instead of default sub menu (in enterprise genesis theme)
    below is the code I use. But it is not perfect.. 🙁 it breaks the menu on pages/posts that are not bbpress..

    // Subnav dependent on category
    remove_action('genesis_after_header', 'genesis_do_subnav');
    add_action('genesis_after_header', 'custom_do_subnav');
    
    function custom_do_subnav() {
    echo '<div id="subnav"><div class="wrap"><ul id="menu-secmenu" class="menu genesis-nav-menu menu-secondary">';
    if ( is_bbpress() ) { wp_nav_menu( array('menu' => 'community' ));
    }
    
    else {genesis_do_subnav();}
    echo '</div></div>';
    }

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    is there anything I can add to check for bbpress first?

    I have been looking at your bbpress genesis extend.. trying to get the idea,, how to register custom bbpress menu, the same way you do register custom bbpress sidebar.. but I am not getting far..

    Although, it did trigger the thought that such a feature
    custom bbpress menu should be added to your plugin.

    any thoughts?

    Kris

    http://wordpress.org/plugins/bbpress-genesis-extend/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘integrate with submenu – new feature suggestion’ is closed to new replies.