WordPress.org

Ready to get started?Download WordPress

Forums

Search tab in Nav Bar (8 posts)

  1. telugucinematoday
    Member
    Posted 5 years ago #

    Hey guys,

    Thematic allows for a search tab to be added into the sidebars. Is it possible to add this search tab into the nav bar? Next to the 'home', 'about', 'contact' tabs?

    Please let me know if anyone knows how to do this.

    Thank You,
    TCT

  2. Roy
    Member
    Posted 5 years ago #

    You COULD write a "page" with a searchform I guess, but perhaps there are more fancy ways of doing that.

  3. telugucinematoday
    Member
    Posted 5 years ago #

    Yeah I thought about that, but I wanted to have the convenience of having a search tab directly in the nav bar. Rather than clicking to a page specifically set aside for the searchform.

    Anyone know how to do this?

  4. Roy
    Member
    Posted 5 years ago #

    But what do you mean with "tab" then? A "tab" (I think) goes to a (in your case) page. Isn't your question if you can put a search form in the header?

  5. telugucinematoday
    Member
    Posted 5 years ago #

    Right, sorry, thats what I meant. I want a search form in my nav bar.

    How do I do that?

  6. Roy
    Member
    Posted 5 years ago #

    That's possible, but not easy. This is from my header.php:

    <div class="search">
    <?php  include (TEMPLATEPATH . "/searchform.php"); ?>
    </div>

    Which means that thre is also a searchform.php:

    <form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
    <input type="text" size="20" name="s" id="s" value="<?php _e('Search') ?>..."  onblur="if(this.value=='') this.value='<?php _e('Search') ?>...';" onfocus="if(this.value=='<?php _e('Search') ?>...') this.value='';"/>
    </form>

    And of course you need to makeup, so this is from my style.css:

    }
    
    .search {
    	float:right;
    	padding:1.5em 5% 0 0;
    }
    .search form {
    	margin:0;
    	padding:0;
    }
    .search input {
    	display:inline;
    	width:218px;
    	border:1px solid #69b;
    	margin:0;
    	padding:0.2em 5px;
    	background:#38b;
    	color:#ddd;
    	font-size:1.1em;
    }

    Just to get you going :-)

  7. telugucinematoday
    Member
    Posted 5 years ago #

    thank you gangleri!!!

    I will try to get it to work.

    Much appreciated :)

  8. telugucinematoday
    Member
    Posted 5 years ago #

    If I wanted to put up google search instead, how would I go about doing that? setting it up in the nav bar I mean

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags