検索結果をタイル型グリッド表示に。ついでにCrayon Syntax HighlighterをUrvanov Syntax Highlighterに入れ替え
検索結果をタイル(?)型の表示にしたかったので、search.php を子テーマにコピーしました。
で、Crayon Syntax Highlighter がエラーが出ていたので、phpのバージョンかな?と思ったんですが、Gtranslateとのからみみたいな感じだったんで、Urvanov Syntax Highlighterに入れ替えました。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
<?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',
''
);
?> |
でもって、Gtranslateとcrayon-syntax-highlighterが合わないみたいなので、