nothing happen in search form

时间:2020-06-06 作者:hadis

我想创建搜索表单,但当我搜索时什么都没有发生,这是代码:索引。php:

 <div class="tech-btm">
      <?php get_search_form();?>
 </div>
搜索表单:

<form role="search" method="get" id="searchform" action="<?php echo home_url(\'/\')?>">
    <div><label class="screen-reader-text" for="s">Search for:</label>
        <input type="text" value="" name="s" id="s" />
        <input type="submit" id="searchsubmit" value="Search" />
    </div>
</form>
问题是什么?有什么问题吗?

1 个回复
SO网友:thegirlinthecafe

您是否也将代码放入索引中。php来实际显示搜索结果?

https://wordpress.org/support/article/creating-a-search-page/

相关推荐