【发布时间】:2021-10-10 15:04:11
【问题描述】:
这里是非常新的 Wordpress 学徒。试图让我的存档页面在两列中显示帖子,如下所示:
发布 1 发布 2
发布 3 发布 4
这是我们正在开发的 figma 的一个示例:https://ibb.co/N3XwtwD
我的问题是,我可以在我的文件中添加什么代码来允许这样做?我目前在此处插入的 html 部分上有一些引导类,它显示为一列,所以我不知道这些类是否会干扰任何东西。下面是我的archive.php代码:
<?php
get_header();
?>
<div class="container mt-5 mb-5">
<p class="font-size"><?php the_archive_title(); ?></p>
<hr>
</div>
<div class="container">
<?php
while(have_posts()) {
the_post(); ?>
<div class="row">
<div class="col-lg-6">
<p class="font-size text-center"><a href="<?php the_permalink();?>"><?php the_title();?></a></p>
<img class="img-fluid mb-3"<?php
the_post_thumbnail();
?>
<p class="category-font">Published on <?php the_time('n.j.y');?></p>
<p>Posted by <?php the_author_posts_link() ?></p>
</div>
</div>
<?php }
echo paginate_links();
?>
</div>
<?php
get_footer();
?>
第一次在这里发帖,如果我遗漏了任何重要的内容,敬请见谅。真的很感激这个地方!
谢谢!
【问题讨论】: