WordPress Search Question

Discussion in 'WordPress' started by DnixDesigns, Oct 19, 2008.

  1. #1
    I am current making my first wordpress theme and i was wondering how to get the search to work. I have searched the internet, but I could not find anything that worked. You can take a look at the site so far at http://www.dnixdesigns.com/iht. (sorry about the unactive link)

    Thanks,
    Jake Philbrick
     
    DnixDesigns, Oct 19, 2008 IP
  2. magicinthedesert

    magicinthedesert Peon

    Messages:
    143
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you're simply looking to have a search feature on your site, you could use something like this:

    <form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
    <label class="hidden" for="s"><?php _e('Search for:'); ?></label>
    <div><input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
    <input type="submit" id="searchsubmit" value="Search" />
    </div>
    </form>
    Code (markup):
    You can also find more information about manipulating this at:
    http://codex.wordpress.org/Creating_a_Search_Page

    And Lorelle is an indispensable resource:
    http://lorelle.wordpress.com/2006/02/11/understanding-and-fixing-wordpress-search/
     
    magicinthedesert, Oct 22, 2008 IP