是否可以在网格布局中显示完整的帖子?
Is it possible to show full posts in Grid layout?
是否可以在主页上以网格布局显示完整的最新帖子而不是摘录?
分别使用 the_content()
或 echo get_the_content()
代替 the_excerpt()
或 echo get_the_excerpt()
。
谢谢
您可以随时将您的 html 添加到下面的代码中
<?php
$args = array(
'post_type' =>'post',
'posts_per_page' => 4,
'order' =>'DESC'
);
$the_query = new WP_Query($args);
if ( $the_query->have_posts() ) :
while ( $the_query->have_posts() ) :
$the_query->the_post();
?>
<div class="gridlayout">
<?php the_content(); ?>
</div>
<?php endwhile; wp_reset_query(); endif; ?>
是否可以在主页上以网格布局显示完整的最新帖子而不是摘录?
分别使用 the_content()
或 echo get_the_content()
代替 the_excerpt()
或 echo get_the_excerpt()
。
谢谢
您可以随时将您的 html 添加到下面的代码中
<?php
$args = array(
'post_type' =>'post',
'posts_per_page' => 4,
'order' =>'DESC'
);
$the_query = new WP_Query($args);
if ( $the_query->have_posts() ) :
while ( $the_query->have_posts() ) :
$the_query->the_post();
?>
<div class="gridlayout">
<?php the_content(); ?>
</div>
<?php endwhile; wp_reset_query(); endif; ?>