我正在尝试将我的帖子发布到另一个页面(博客)上,我的“主页”显示为我的首页。这两个页面都有自己的模板(home for home,blog for blog)。
在阅读设置中,我将首页设置为主页,将帖子页面设置为博客。但当我转到url时。com/blog,它显示与我的主页相同的模板。我不知道为什么它不会显示我的两篇博文。
在我家。php模板,我有以下代码,这可能是问题所在吗?
<!-- Display featured images -->
<?php
$args = array(\'post_type\'=> \'page\');
query_posts( $args );
?>
<!-- Get featured images -->
<div class="main-thumb left">
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
?>
<li>
<a href="<?php echo get_permalink(); ?>">
<div class="tint">
<div class="overlay caps">
<?php
echo(types_render_field("top-overlay", array("output"=>"html")));
?>
<?php
echo(types_render_field("bottom-overlay", array("output"=>"html")));
?>
</div> <!-- end .OVERLAY-->
<?php the_post_thumbnail(); ?>
</div> <!-- end .TINT-->
</a>
</li>
<?php
}
}
?>
</div> <!-- end .MAIN-THUMB-->