Php 搜索框正在使用帖子标题作为前缀

Php 搜索框正在使用帖子标题作为前缀,php,wordpress,forms,Php,Wordpress,Forms,我的网站上的搜索框有问题。问题是,如果有人在帖子中搜索,它会将他重定向到http://example.com/post-title/?s=test而不是http://example.com/?s=test。当然,从主页进行搜索工作正常 我正在使用简单自定义Css插件来管理自定义Css。有一个存储我的css搜索框 以下是搜索框代码的外观: <form class="form-wrapper cf" style="margin-left:85px; margin-bottom:30px">

我的网站上的搜索框有问题。问题是,如果有人在帖子中搜索,它会将他重定向到
http://example.com/post-title/?s=test
而不是
http://example.com/?s=test
。当然,从主页进行搜索工作正常

我正在使用简单自定义Css插件来管理自定义Css。有一个存储我的css搜索框

以下是搜索框代码的外观:

<form class="form-wrapper cf" style="margin-left:85px; margin-bottom:30px">
    <input type="text" name="s" placeholder="Search..." oninvalid="this.setCustomValidity('Error!')" required="">
    <button type="submit">Search</button>
</form>

搜寻

你知道什么地方出了问题吗?

当你说,它在主页上运行正常时,请给出
action
属性并将其设置到主页上,然后:

<form class="form-wrapper cf" action="/" style="margin-left: 85px; margin-bottom: 30px">
<!----------------------------^^^^^^^^^^


CSS在这里不起作用。