I’m trying to pull wordpress content to the grid structure created with Bootstrap. But I don’t want to create separate query for each column. How can I pull content from the same category in a single query? My codes are as follows.I want to show the last 3 items added
<div class="container">
<?php query_posts('showposts=3&orderby=date&cat=1'); ?>
<?php while (have_posts()) : the_post(); ?>
<div class="row">
<div class="col-8">
<img src="" class="img-fluid rounded" alt="...">
</div>
<div class="col-4">
<img src="" class="img-fluid mb-3 rounded" alt="...">
<img src="" class="img-fluid rounded" alt="...">
</div>
</div>
<?php endwhile; ?>
</div>
2
Answers
click the picture for the problem
else created a problem. Also the 2 contents in the right column are the same. I wanted it to be different.