我创建了一个自定义模板,这是代码,我希望在结果3列和右边的边栏中。我试着用css做类似的事情
.grid-container{
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
grid-gap: 20px 20px;
}但我没有3列和边栏被打破,这个页面是为了显示,定制的帖子为例,我只是把标题和图像。如果有人能帮上忙谢谢你
'movie'
);
$the_query = new WP_Query($args); ?>
have_posts() ) : ?>
have_posts() ) : $the_query->the_post(); ?>发布于 2021-10-29 13:15:26
请检查下面的代码,您需要在grid-container之前启动while loop div,如下所示:
'movie'
);
$the_query = new WP_Query($args); ?>
have_posts() ) : ?>
have_posts() ) : $the_query->the_post(); ?>试着得到你想要的结果。
https://wordpress.stackexchange.com/questions/397391
复制相似问题