【问题标题】:What is wrong with this form? It does not seem to post (get)这个表格有什么问题?它似乎没有发布(获取)
【发布时间】:2015-04-30 18:33:30
【问题描述】:

查看相关网站的搜索表单:

http://www.xyzai.com/academia/

它只是默认返回原始主页。

这很奇怪,因为表单似乎设置正确。

<form action="http://www.xyzai.com/academia/" class="search-form standard-search" method="get" role="search">
    <div class="input-group">        
        <input type="search" title="Search for:" name="s" value="" placeholder="Search …" class="search-field form-control">            
        <span class="input-group-btn">
            <button class="btn btn-default search-submit" type="submit" id="searchsubmit"><i class="fa fa-search"> </i></button>
        </span>
    </div><!-- /input-group -->
</form>

这是什么原因造成的?

应要求提供更多信息:

当 Wordpress 的永久链接关闭(默认设置)时,它会出现,效果很好。否则,不完成搜索。

【问题讨论】:

  • 可能是页面被提交到重定向,或者.htdocs 中有重写规则之类的。根据您提供的信息量,没有人可以回答这个问题。
  • 这至少是一个线索,谢谢。看来它可能正在重定向。
  • 你的 .htaccess 文件是什么样的?

标签: php html wordpress forms get


【解决方案1】:

Buddypress 劫持了 wordpress 的搜索。

我必须将它添加到 wp-config.php

定义 ('BP_SEARCH_SLUG', 'find');

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-16
    • 1970-01-01
    • 1970-01-01
    • 2012-11-15
    • 2011-11-20
    相关资源
    最近更新 更多