Title: Problem with search.php/searchform.php
Last modified: August 19, 2016

---

# Problem with search.php/searchform.php

 *  Resolved [innernature](https://wordpress.org/support/users/innernature/)
 * (@innernature)
 * [17 years ago](https://wordpress.org/support/topic/problem-with-searchphpsearchformphp/)
 * Hi there,
 * I’ve been having trouble with the search function on a blog theme I’ve been working
   on. It was working fine before, but I tried to put a nice search button image
   in by adding a searchform.php where I had the search form code, so I could edit
   that part.
    The include seems to work fine, and the searchform.php does send 
   the user to the search.php page with the search results, but as far as I can 
   tell, the search.php has disconnected itself from the style sheet, so it looks
   like plain text. Does anyone know why this is happening?
 * Here’s my test blog:
    [http://silentskydesign.com/wordpresstest/](http://silentskydesign.com/wordpresstest/)
 * Here are some details:
 * In Index.php is the include to searchform.php:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 *  <?php include (TEMPLATEPATH . ‘/searchform.php’); ?>
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * Here is searchform.php’s code:
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 *  <div id=”search”>
 *  <form name=”searchform” id=”searchform” method=”get” action=”<?php bloginfo(‘
   home’); ?>”>
 *  <input class=”text” type=”text” name=”s” id=”s” value=”<?php the_search_query();?
   >”/>
 *  <input class=”submit” type=”image” src=”<?php bloginfo(‘template_directory’);?
   >/images/searchbtn2.jpg” value=”” />
 *  </form>
 * </div><!– /search –>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ~~~~~~
 * Here is a link to a text file version of search.php:
 * [http://silentskydesign.com/search.txt](http://silentskydesign.com/search.txt)
 * Thanks a bunch,
 * C.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [innernature](https://wordpress.org/support/users/innernature/)
 * (@innernature)
 * [17 years ago](https://wordpress.org/support/topic/problem-with-searchphpsearchformphp/#post-1021502)
 * Me again,
 * Just to make sure you’re looking at the right theme, click this link instead:
 * [http://silentskydesign.com/wordpresstest/?wptheme=Silver%20Night](http://silentskydesign.com/wordpresstest/?wptheme=Silver%20Night)
 * Or use the theme switcher plug-in to select “Silver Night”.
 * thanks
 *  Thread Starter [innernature](https://wordpress.org/support/users/innernature/)
 * (@innernature)
 * [17 years ago](https://wordpress.org/support/topic/problem-with-searchphpsearchformphp/#post-1021508)
 * I’ve found the problem. I thought I would post what it was in case someone else
   has a similar problem later on. I added the doctype and header info(same as on
   my index page) to the top of search.php.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Problem with search.php/searchform.php’ is closed to new replies.

## Tags

 * [search form](https://wordpress.org/support/topic-tag/search-form/)
 * [search.php](https://wordpress.org/support/topic-tag/search-php/)
 * [searchform.php](https://wordpress.org/support/topic-tag/searchform-php/)

 * 2 replies
 * 1 participant
 * Last reply from: [innernature](https://wordpress.org/support/users/innernature/)
 * Last activity: [17 years ago](https://wordpress.org/support/topic/problem-with-searchphpsearchformphp/#post-1021508)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
