• I have a customized WordPress template, and need to add search function. I located the following code via this link, and embedded it into my template:

    <form method=”get” id=”searchform” action=”<?php bloginfo(‘url’); ?>/”>
    <label class=”hidden” for=”s”><?php _e(‘Search:’); ?></label>
    <input type=”text” value=”<?php the_search_query(); ?>” name=”s” id=”s” />
    <input type=”submit” id=”searchsubmit” value=”Search” />
    </form>

    The search form shows up once I have the code installed, but needs to point to the site to search the posts in the blog. (Also – how do I get it to left justify?) I am uncertain of how to link it up so that it always runs the search parameters, and links to the correct search template (the one that will display results).

    go here, and type “test” into the search box to see what I am talking about. How do I make this search box behave like a regular search engine, and display search results on a separate template?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to implement search code on custom WordPress Template’ is closed to new replies.