如何在Wordpress search form 除了顯示post title外也顯示description並高亮顯示
如何在Wordpress search form 除了顯示post title外也顯示description並高亮顯示
<div class="row">
<div class="page-heading span12 clearfix alt-bg <?php echo $default_page_heading_bg_alt; ?>">
<div class="heading-text">
<?php $allsearch = new WP_Query("s=$s&showposts=-1"); $key = esc_html($s, 1); $count = $allsearch->post_count; _e('', "swiftframework"); wp_reset_query(); ?>
<?php if ($count == 1) : ?>
<?php printf(__('<h1>%1$s result for <span>%2$s</span></h1>', 'swiftframework'), $count, $key ); ?>
<?php else : ?>
<?php printf(__('<h1>%1$s results for <span>%2$s</span></h1>', 'swiftframework'), $count, $key ); ?>
<?php endif; ?>
</div>
<?php
// BREADCRUMBS
echo sf_breadcrumbs();
?>
</div>
</div>
<div class="row">
<div class="page-heading span12 clearfix alt-bg <?php echo $default_page_heading_bg_alt; ?>">
<div class="heading-text">
<?php $allsearch = new WP_Query("s=$s&showposts=-1"); $key = esc_html($s, 1); $count = $allsearch->post_count; _e('', "swiftframework"); wp_reset_query(); ?>
<?php if ($count == 1) : ?>
<?php printf(__('<h1>%1$s result for <span>%2$s</span></h1>', 'swiftframework'), $count, $key ); ?>
<?php else : ?>
<?php printf(__('<h1>%1$s results for <span>%2$s</span></h1>', 'swiftframework'), $count, $key ); ?>
<?php endif; ?>
</div>
<?php
// BREADCRUMBS
echo sf_breadcrumbs();
?>
</div>
</div>
1 个回复
[已注销]
赞同来自: