a-go-go.com

主に動作確認用。いろいろ実験&ひとりごと

外字一覧
旧字一覧
Sara
Line
blog

検索結果をタイル型グリッド表示に。ついでにCrayon Syntax HighlighterをUrvanov Syntax Highlighterに入れ替え

検索結果をタイル(?)型の表示にしたかったので、search.php を子テーマにコピーしました。

で、Crayon Syntax Highlighter がエラーが出ていたので、phpのバージョンかな?と思ったんですが、Gtranslateとのからみみたいな感じだったんで、Urvanov Syntax Highlighterに入れ替えました。

<?php
/**
 * Luxeritas WordPress Theme - free/libre wordpress platform
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * @copyright Copyright (C) 2015 Thought is free.
 * @license http://www.gnu.org/licenses/gpl-2.0.html GPL v2 or later
 * @author LunaNuko
 * @link https://thk.kanzae.net/
 * @translators rakeem( http://rakeem.jp/ )
 */

global $luxe, $s;
get_header();

if( function_exists( 'thk_search_result' ) === false ) {
	function thk_search_result() {
		global $s, $wp_query; ?>
<p id="list-title"><?php echo
	sprintf( __( 'Search results of [%s]', 'luxeritas' ), esc_html( $s ) ) .
	sprintf( __( ' : %s', 'luxeritas' ), $wp_query->found_posts );
?></p><?php
	}
}
?>
<input type="hidden" id="search-result" value="<?php echo esc_html( $s ); ?>" />

<?php
if( !empty( $s ) && have_posts() === true ) {
?>
<div id="section"<?php echo $luxe['content_discrete'] === 'indiscrete' ? ' class="grid"' : ''; ?>>
<div id="tile-4">

<?php
	get_template_part( 'loop' );
?>
</div><!--/#section-->
<?php
}
else {
?>
</div>
<article>
<div id="core" class="grid">
<?php
if( $luxe['breadcrumb_view'] === 'inner' ) get_template_part( 'breadcrumb' );
?>
<div itemprop="mainEntityOfPage" id="post">
<h2 id="list-title"><?php echo __( 'No search hits', 'luxeritas' ); ?></h2>
<p><?php echo __('Sorry, the requested post was not found.', 'luxeritas'); ?></p>
</div><!--/#post-->
</div><!--/#core-->
</article>
<?php
}
?>
</main>
<?php thk_call_sidebar(); ?>
</div><!--/#primary-->
<?php echo apply_filters( 'thk_footer', '' ); ?>

なぜか検索結果が1行ずつ表示されていたので search.phpを子テーマにコピー。

でもって、Gtranslateとcrayon-syntax-highlighterが合わないみたいなので、

コメント

この記事へのコメントはありません。

関連記事

Archive

  1. サックス運指

  2. カタカナにする文字起こし

  3. 厄年・九曜星

  4. 単に数字を置換するだけ(月)

  5. 『crysti32.ocx』またはその依存関係のひとつが適切に登録されていません。

  6. 改行コードを消す!には

  7. ペーストした画像をワードプレスに投稿する⇒プラグイン不要

  8. Lineのスタンプ

  9. VisualStudio2023 コントロールのプロパティが表示されない

PAGE TOP