• 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]

Viewing 7 replies - 1 through 7 (of 7 total)
  • What theme are you using? Where did you download it from?

    Thread Starter asiostudio

    (@asiostudio)

    The theme is called X. It was downloaded from Themeforest.

    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 here.

    Thread Starter asiostudio

    (@asiostudio)

    So the code being used doesn’t have a problem then?

    I couldn’t really say. We do not have access to, nor do we support, commercial themes

    Thread Starter asiostudio

    (@asiostudio)

    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.

    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.