ThemeShaper Forums » Thematic

[closed]

search bar above menu

(6 posts)
  • Started 6 years ago by Jakob_at_dox
  • Latest reply from helgatheviking
  • This topic is resolved
  1. Hey,

    I'm using this code to add a search bar to my header. Trouble is that it's placed BELOW the menu and i need to place it above.

    function add_search(){
    include (TEMPLATEPATH . '/searchform.php');
    }
    add_action('thematic_header','add_search');

    Any ideas?

    Posted 6 years ago #
  2. bogh
    Member

    Try with a number after 'add_search', the number sets the position, the number for the menu is 9

    function add_search(){
    include (TEMPLATEPATH . '/searchform.php');
    }
    add_action('thematic_header','add_search',1);
    Posted 6 years ago #
  3. bogh
    Member

    I have done this code for the search box, it has a button and the "search" text inside the input.

    function searchbox(){?>
    <div id="overheader">
        <form id="searchform" method="get" action="<?php bloginfo('url'); ?>/">
            <input type="text" name="s" id="s" class="search_text" size="15" value="search" onfocus="if(this.value=='search'){this.value=''}" onblur="if(this.value==''){this.value='search'}" />
            <input type="submit" value="" class="search_button" />
        </form>
    
    </div>
    <?php }
    add_action('thematic_header','searchbox',0);
    Posted 6 years ago #
  4. check out the priority numbers for the functions on thematic_header()

    www.bluemandala.com/thematic/thematic-structure.html

    Posted 6 years ago #
  5. thanks, that's perfect!

    Posted 6 years ago #
  6. sidenote, i think you can just call get_search_form() in you function and the search form will be displayed.

    Posted 6 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.