Stinger7で検索結果を表示させる
どうも、Pan Graphicoです。
Stinger7をテーマに使用してみて気がついたこと。
あれ?、検索結果が表示されていません。
Stinger7で検索結果を表示させる
すでにアップデートで修正されていましたが、
先のバージョンでカスタマイズしていたので、こちらにメモ代わりとして。
・itiran.phpを編集
先のバージョンでは、if文に検索結果がないので、、、
1 2 3 4 5 6 7 8 9 |
<?php if ( is_archive() || ( is_home() && $GLOBALS["stdata44"] === '' )) { if ( isset($GLOBALS['stdata5']) && $GLOBALS['stdata5'] === 'yes' ) { get_template_part( 'itiran-thumbnail-off' ); }else{ get_template_part( 'itiran-thumbnail-on' ); } } ?> |
is_search()を追加。
1 2 3 4 5 6 7 8 |
<?php if ( is_archive() || is_search() || ( is_home() && $GLOBALS["stdata44"] === '' )) { if ( isset($GLOBALS['stdata5']) && $GLOBALS['stdata5'] === 'yes' ) { get_template_part( 'itiran-thumbnail-off' ); }else{ get_template_part( 'itiran-thumbnail-on' ); } } |
とりあえず、検索結果を押すと動き出しましたが、
細かいところはまだ見れてないので、
新しいバージョンと比較しながら、またチェックしてみます。
先にも書きましたが、新しいバージョンでは修正済みとのことでした。