此搜索。php显示上述搜索的所有结果,但不包括标题、搜索结果。。。。。。并查询查询金额;甚至没有找到搜索并打印searchform。
<?php get_header(); ?>
<?php if ( have_posts() ) : ?>
<h1 class="page-title"><?php printf( __( \'Search Results for: %s\', \'nothing\' ), \'\' . get_search_query() . \'\' ); ?></h1>
<!--custom area-->
<ul id="post-list">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php
$featured = get_post_meta($post->ID,\'_thumbnail_id\',true);
$attachments = get_children( \'post_type=attachment&orderby=menu_order&exclude=\'.$featured.\'&post_mime_type=image&post_parent=\'.$post->ID );
$vimeo = get_post_meta($post->ID, \'rw_post-vimeo\',true);?>
<li class="post">
<span class="entry-published">
<time datetime="<?php the_time(\'Y-m-d\')?>"><?php the_time(\'F jS, Y\') ?></time>
<!--Start Single Image-->
<?php get_template_part( \'includes/inc-image\' ); ?>
<?php endif; ?>
<!--End Single Image-->
<!--Start Rest Of Post Content-->
<?php get_template_part( \'includes/inc-detail\' ); ?>
<?php endwhile; endif; ?>
<section id="pagination">
<?php wp_pagenavi(); ?>
</section>
<!--End Rest Of Post Content-->
</li>
</ul>
<!-- end of custom area -->
<?php else : ?>
<h2><?php _e( \'Nothing Found\', \'nothing\' ); ?></h2>
<p><?php _e( \'Sorry, but nothing matched your search criteria. Please try again with some different keywords.\', \'twentyten\' ); ?></p>
<?php get_search_form(); ?>
<?php endif; ?>
<?php get_footer(); ?>
有趣的是,虽然li标签中的帖子出现在开头<h1 class="page-title">
因此,我假设这是一个声明问题,但无法解决:(有什么想法吗?