📄 search.php
字号:
<?php get_header(); ?>
<div id="primary" class="single-post">
<div class="inside">
<div class="primary">
<?php if (have_posts()) : ?>
<h1>Search Results</h1>
<?php while (have_posts()) : the_post(); ?>
<div class="story">
<div class="datetime"><?php the_time('M') ?><span><?php the_time('jS') ?></span></div>
<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>
<div class="postin">
<span class="p_author"><?php the_author() ?></span>
<span class="p_category"><?php the_category(', ') ?></span>
<?php if ( (function_exists('UTW_ShowTagsForCurrentPost')) ) { ?><span class="p_tags"><?php UTW_ShowTagsForCurrentPost("commalist") ?></span><?php }?>
<span class="p_read"><a href="<?php the_permalink() ?>">Read on</a></span>
</div>
</div>
<?php endwhile; ?>
<div class="navigation">
<div class="left"><?php next_posts_link('« Previous Entries') ?></div>
<div class="right"><?php previous_posts_link('Next Entries »') ?></div>
</div>
<?php else : ?>
<h1>No posts found. Try a different search?</h1>
<?php endif; ?>
</div>
<div class="secondary">
<h2>Search</h2>
<div class="featured">
<p>You searched for “<?php echo wp_specialchars($s, 1); ?>” at <?php bloginfo('name'); ?>. There were
<?php
if (!$results) echo "no results, better luck next time.";
elseif (1 == $results) echo "one result found. It must be your lucky day.";
else echo $results . " results found.";
?>
</p>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -