2016-04-10 8 views
0

検索バーに次のコードを使用しています。送信をクリックすると、何もしません。それは別のページにも向いていません。 Understrapテーマを使用しています。ワードプレス検索が送信されない

<div id="search"> 
         <form action="/" method="get"> 
          <input type="search" placeholder="Type your search word(s) here" value="<?php get_search_query(); ?>" /> 
          <button type="submit" class="btn btn-primary">Search</button> 
         </form> 
        </div> 

答えて

0

action'/'するのではなく、あなたのサイトのURLを属性にします。いつか '/'が便利になりたい。

<div id="search"> 

    <form method="get" id="searchform" action="<?php bloginfo('url'); ?>"> 

    <input type="search" placeholder="Type your search word(s) here" value="<?php get_search_query(); ?>" /> 
     <button type="submit" class="btn btn-primary">Search</button> 
     </form> 
    </div> 
関連する問題