Search Results (search.php)

Affinger英語サイト用コード(検索結果ページ)

  1. <?php get_header(); ?>
  2. <div id="content" class="clearfix">
  3.     <div id="contentInner">
  4.         <main>
  5.             <article>
  6.                 <div class="post post-search">
  7.                     <h1 class="entry-title"> <!--検索結果数-->
  8.                         <?php if ( function_exists( 'st_cs_get_search_query' ) ): ?>
  9.                             <?php echo esc_html( st_cs_get_search_query( null, '', 'Search', ' : Search results', ' - ', '・' ) ); ?>
  10.                             <?php echo $wp_query->found_posts; ?>
  11.                         <?php else: ?>
  12.                             <?php $criteria = ( $s !== '' ) ? $s . ' : ' : ''; ?>
  13.                             <?php echo esc_html( $criteria ); ?>Search results <?php echo $wp_query->found_posts; ?>
  14.                         <?php endif; ?>
  15.                     </h1>
  16.                     <!--検索結果数終わり-->
  17.                     <?php if ( function_exists( 'st_cs_is_search' ) && st_cs_is_search() ): ?>
  18.                         <div class="st-custom-search-result-box"><?php echo do_shortcode( '[st-custom-search show_text_input="" template="result"]' ); ?></div>
  19.                     <?php else: ?>
  20.                         <?php //get_template_part( 'searchform' ); //Search form ?>
  21.                     <?php endif; ?>
  22.                     <?php if ( is_active_sidebar( 32 ) ) { ?>
  23.                         <?php if ( function_exists( 'dynamic_sidebar' ) && dynamic_sidebar( 32 ) ) : else : //検索結果ページ(上部)に表示ウィジェット ?>
  24.                         <?php endif; ?>
  25.                     <?php } ?>
  26.                     <?php if ( st_is_st_search_suggestion_enabled() ): ?>
  27.                         <?php echo do_shortcode( '[st-search-suggestion /]' ); ?>
  28.                     <?php endif; ?>
  29.                 </div>
  30.                     <?php get_template_part( 'itiran' ); //投稿一覧読み込み ?>
  31.                     <?php get_template_part( 'st-pagenavi' ); //ページナビ読み込み ?>
  32.                     <?php if ( is_active_sidebar( 33 ) ) { ?>
  33.                         <?php if ( function_exists( 'dynamic_sidebar' ) && dynamic_sidebar( 33 ) ) : else : //検索結果ページ(下部)に表示ウィジェット ?>
  34.                         <?php endif; ?>
  35.                     <?php } ?>
  36.             </article>
  37.         </main>
  38.     </div>
  39.     <!-- /#contentInner -->
  40.     <?php get_sidebar(); ?>
  41. </div>
  42. <!--/#content -->
  43. <?php get_footer(); ?>

目次