Forums

Add search bar in nav menu? (1 post)

  1. joogle
    Member
    Posted 4 months ago #

    My site is http://www.huloji.com and i want to add a search bar in the nav menu
    Here is the part of my Header.php with the nav menu
    </div>
    </div>

    <div class="span-24">
    <div id="navcontainer">
    <?php
    if(function_exists('wp_nav_menu')) {
    wp_nav_menu( 'theme_location=menu_2&menu_id=nav&container=&fallback_cb=menu_2_default');
    } else {
    menu_2_default();
    }

    function menu_2_default()
    {
    ?>
    <ul id="nav">
    <li <?php if(is_home()) { echo ' class="current-cat" '; } ?>>">Home
    <?php wp_list_categories('depth=3&exclude=1&hide_empty=0&orderby=name&show_count=0&use_desc_for_title=1&title_li='); ?>

    <?php
    }
    ?>

    </div>
    </div>

    here is the php code for my search bar.
    <div id="topsearch" class="span-7 last">
    <?php get_search_form(); ?>
    nothing seems to work wherever i paste the search bar code

Reply

You must log in to post.

About this Topic