我正在努力构建博客文章的布局。我需要能够在所有文章博客文章之间添加表格。我不确定如何在所有帖子之间放置表格。我不确定这是否有意义,但这是我的代码。我的CSS父母使用了flex box
右侧布局:
我目前的布局错误:
这是我的代码:
答案 0 :(得分:1)
您将数据存储在来自the_post()查询的数组变量中。您将获得数组长度,并且可以使用诸如for循环或while循环之类的循环。示例:
for ($i=0; $i < $array_length ; $i++) {
if ($i == 1){
//Here you can write the form block
}
else{
//continue to write the post block
}
}