Skip to content

Instantly share code, notes, and snippets.

@jhouedanou
Created November 20, 2016 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhouedanou/bc5c7d9a9b634163dd57e401ee60b0bc to your computer and use it in GitHub Desktop.
Save jhouedanou/bc5c7d9a9b634163dd57e401ee60b0bc to your computer and use it in GitHub Desktop.
<?php
$args2 = array( 'cat'=> 2);
//compteur
$ints=1;
$loop2 = new WP_Query( $args2 );
while ( $loop2->have_posts() ) : $loop2->the_post();
?>
<li class="list">
<div class="info">
<div class="subinfo">
<?php
if ( has_post_thumbnail()) {
the_post_thumbnail('medium', array('class' => 'miniature'));
}
?>
</div>
<div class="black">
<div class="eron ym-gbox">
<h3><?php the_title();?></h3>
<?php
wpautop(the_excerpt());
echo "<a href=\"#test-popup".$ints." \"class=\"open-popup-link\">"
?>afficher la popup</a>
<?php echo "<div id=\"test-popup".$ints."\" class=\"white-popup mfp-hide\">" ?>
<?php the_content();?>
</div>
</div>
</div>
</div>
</li>
<?php
$ints++;
endwhile;
wp_reset_query();
?>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment