Title: Search box causing 404
Last modified: August 21, 2016

---

# Search box causing 404

 *  [asiostudio](https://wordpress.org/support/users/asiostudio/)
 * (@asiostudio)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/search-box-causing-404/)
 * Hello,
    I need to have a search box in my client’s header and due to the theme
   they are using, I can’t use the PHP code to insert it. Instead, I did a search
   and found the html code I can use to put it in.
 *     ```
       <form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
           <div align="right" style="margin-top:10px;">
           <input type="text" value="" placeholder="To search, type and hit enter." name="s" id="s" size="25" />
           </div>
       </form>
       ```
   
 * Unfortunately, that causes the site to go to a 404 when using it. I have figured
   out the reason for this is because the url that is returned has an out of place
   < in it.
 * `http://mccartyfamilyfarms.com/%3C?s=search`
 * It is represented in the url above as %3c. In any case, if you delete it, the
   search works exactly as it should.
 * Can someone help me figure out why that is showing up?
 * Thanks much
    Dylan Fleming _[sig moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome)]_

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/search-box-causing-404/#post-4645413)
 * What theme are you using? Where did you download it from?
 *  Thread Starter [asiostudio](https://wordpress.org/support/users/asiostudio/)
 * (@asiostudio)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/search-box-causing-404/#post-4645417)
 * The theme is called X. It was downloaded from Themeforest.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/search-box-causing-404/#post-4645418)
 * I’m sorry but as you appear to be using a commercial theme, you need to seek 
   support from the theme’s developer/vendor. We do not support [commercial products](http://codex.wordpress.org/Forum_Welcome#Commercial_Products)
   here.
 *  Thread Starter [asiostudio](https://wordpress.org/support/users/asiostudio/)
 * (@asiostudio)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/search-box-causing-404/#post-4645419)
 * So the code being used doesn’t have a problem then?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/search-box-causing-404/#post-4645421)
 * I couldn’t really say. We do not have access to, nor do we support, commercial
   themes
 *  Thread Starter [asiostudio](https://wordpress.org/support/users/asiostudio/)
 * (@asiostudio)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/search-box-causing-404/#post-4645424)
 * I am not asking about the theme, that’s why I didn’t bring it up in the first
   place. My inquiry was about the code I provided in the original post.
 * If the problem is with the code provided above, as I originally suspected, then
   I would like to know what is wrong so I can fix it. If the code is sound, then
   I will contact the theme developer and they can give me an answer.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/search-box-causing-404/#post-4645425)
 * Since we do not know the theme, we cannot say for sure what will – or what will
   not – work with that theme. Pleas ask the theme’s vendor.

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

The topic ‘Search box causing 404’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/search-box-causing-404/#post-4645425)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
