我已经更改了我的网站主页,通过进入“设置”>“阅读”并使用“最新帖子”选项,在主页上只显示最新帖子,但我就是无法让事情正常运行。
在主页上,显示的是帖子的全部内容,而不仅仅是标题和摘要,这不仅发生在主页上,还发生在分类页面和归档页面上,所有这些页面都以这种方式呈现。
我的网站是popularitybar.com , 目前我正在使用一个移动主题来测试运行东西。
这些是我的主题索引的内容。php文件
<?php get_header(); ?>
<div id="content" class="clearfix">
<div class="container">
<?php // the loop ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<!-- BEGIN POST FORMAT BACKGROUND CUSTOM FIELD -->
<?php $postformatbackground = get_post_meta($post->ID, \'PostFormatBackground\', true); ?>
<div style="background-image: url(<?php echo $postformatbackground; ?>);background-size:100% auto;position:absolute !important;z-index:-1;top:0;bottom:0;left:0;right:0;width:100%:height:100%;opacity:.4;"></div>
<!-- END POST FORMAT BACKGROUND CUSTOM FIELD -->
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
<!-- BEGIN CUSTOM FIELD FOR EMBEDDABLE CONTENT -->
<?php $featuredembed = get_post_meta($post->ID, \'FeaturedEmbed\', true); ?>
<div class="video-container"><?php echo $featuredembed; ?></div>
<!-- END CUSTOM FIELD FOR EMBEDDABLE CONTENT -->
<!-- BEGIN SHORTCODE OUTSIDE THE LOOP -->
<?php $shortcode = get_post_meta($post->ID, \'Shortcode\', true); ?><?php echo do_shortcode($shortcode); ?>
<!-- END SHORTCODE OUTSIDE THE LOOP -->
<!-- BEGIN COMMENT COUNT + TAG DISPLAY -->
<div class="comment-tag-wrapper">
<a href="<?php the_permalink(); ?>#respond"><?php comments_number( \'<span class="no-comments">\'.__(\'no comments\', \'hero\').\'</span>\', \'<span class="has-comments">1 \'.__(\'comment\', \'hero\').\'</span>\', \'<span class="has-comments">% \'.__(\'comments\', \'hero\').\'</span>\' ); ?></a>
<?php the_tags(\'<span class="post-tag">\',\'</span><span class="post-tag">\',\'</span>\'); ?>
</div>
<!-- END COMMENT COUNT + TAG DISPLAY -->
<!-- BEGIN TITLE, CONTENT -->
<h1 class="post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<div class="entry-content"><?php the_content( __( \'Continues..\', \'hero\' ) ); ?></div>
<!-- BEGIN TITLE, CONTENT -->
</article>
<div class="index-separator"></div>
<?php endwhile; ?>
<!-- BEGIN NEXT PAGE, PREV PAGE -->
<?php get_template_part( \'includes/pagination\'); ?>
<!-- BEGIN NEXT PAGE, PREV PAGE -->
<?php else : ?>
<!-- BEGIN NO CONTENT FOUND -->
<p><?php _e( \'Sorry, nothing found.\', \'hero\' ); ?></p>
<!-- END NO CONTENT FOUND -->
<?php endif; ?>
</div>
<!-- /#content -->
<?php get_footer(); ?>
谢谢!