私のワードプレスのウェブサイトの1つにフラットテーマを使用しています。この検索では、 "issue tracker"のような複数の単語を書くとうまくいきません。 1つの単語については、 "issue"や "tracker"のようにうまくいきます。 searchform.phpファイルのコードは次のとおりです。ワードプレス検索で複数の単語が使用されない
<form method="get" id="searchform" action="<?php echo esc_url(home_url('/')); ?>">
<label for="s" class="assistive-text"><?php _e('Search', 'flat'); ?></label>
<input type="text" class="field" name="s" id="s" placeholder="<?php esc_attr_e('Search', 'flat'); ?>" />
<input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php esc_attr_e('Search', 'flat'); ?>" />
</form>
と私のsearch.phpファイルは次のとおりです。
<?php get_header(); ?>
<?php flat_hook_search_before(); ?>
<h1 class="page-title"><?php printf(__('Search Results for: %s', 'flat'), get_search_query()); ?></h1>
<div id="content" class="site-content" role="main">
<?php flat_hook_search_top(); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php get_template_part('content', get_post_format()); ?>
<?php endwhile; ?>
<?php the_posts_pagination(array('prev_text' => __('<i class="fa fa-chevron-left"></i>', 'flat'), 'next_text' => __('<i class="fa fa-chevron-right"></i>', 'flat'))); ?>
<?php else : ?>
<?php get_template_part('content', 'none'); ?>
<?php endif; ?>
<?php flat_hook_search_bottom(); ?>
</div>
<?php flat_hook_search_after(); ?>
<?php get_footer(); ?>
以前は、それは私の地元のセットアップに取り組んでいたが、今それは私のライブバージョンに取り組んでいません。
解決策をご提案ください。