• meccub

    (@meccub)


    I’ve created a search form for a widget but, for some reason, it is adding a ‘<‘ to the URL. For example: domain.com/<?s=search+term. Obviously this brings up a 404 page, and removing the ‘<‘ works.

    I may have been looking at this for too long, but can’t find the problem. Here’s the code for the form:

    <form role="search" id="searchForm" action="<?php echo home_url( '/' ); ?>" method="get">
        <div><label class="screen-reader-text" for="s" style="display: none">Search for:</label>
            <input type="text" value="" name="s" id="s" />
            <input type="submit" id="searchsubmit" class="button" value="Search" />
        </div>
    </form>

    Any ideas? Thanks in advance for any help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I am having the exact same issue! Did you ever find a solution? Please share if you did!

    I used the standard search plugin and modified the code and styles in the wp-includes/general-template. The standard version did work and I was able to style as-needed. Hope that helps!

    Are you simply trying to add a search box to a sidebar? If so, you can use the native Search widget included with WordPress.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Extra Character in Search URL’ is closed to new replies.