1
I’m creating a gallery of post like that of globe with. that appear 3 different posts at once.
The problem is that it only picks up a post, I would like the *posts to be inserted within the div
without repeating.
<div class="row">
<?php $do_not_duplicate = array(); ?>
<?php
$args = array( 'post_type' => 'post', 'posts_per_page' => 1, 'cat' => 1);
$mosaics = new WP_Query( $args ); ?>
<?php while ($mosaics->have_posts()) : $mosaics->the_post(); ?>
<?php $do_not_duplicate[] = $post->ID; ?>
<div class="img1">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> <?php the_post_thumbnail('class => img-responsive'); ?> </a>
</div>
<?php endwhile; wp_reset_postdata(); ?>
<?php wp_reset_query(); ?>
</div>
<div class="row">
<?php $do_not_duplicate = array(); ?>
<?php
$args = array( 'post_type' => 'post', 'posts_per_page' => 1, 'cat' => 1);
$mosaics = new WP_Query( $args); ?>
<?php while ($mosaics->have_posts()) : $mosaics->the_post(); ?>
<?php $do_not_duplicate[] = $post->ID; ?>
<div class="img2 col-md-12">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> <?php the_post_thumbnail('class => img-responsive'); ?> </a>
</div>
<?php endwhile; wp_reset_postdata(); ?>
</div>
How are you getting:
face this and very simple however important mt, solved a bunch of gambiarra that I had done, thank you very much
– Fernando Alcantara