-
-
Save mi-ca/4c7db2e68ac9947c4e63 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$args = array( | |
'post_type'=>'events', | |
'posts_per_page'=>1 | |
); | |
$the_query = new WP_Query( $args ); | |
// The Loop | |
if ( $the_query->have_posts() ) : ?> | |
<ul> | |
<?php | |
while ( $the_query->have_posts() ) : $the_query->the_post(); ?> | |
<li><article> | |
<?php the_post_thumbnail('medium'); ?> | |
<header><h1><?php the_title();?></h1> | |
<p class="info"> | |
<span class="annee"><?php the_field('annee');?></span> | |
<span class="fb"><?php the_field('lien_facebook');?></span> | |
</p> | |
</header> | |
<div class="content col-sm-12"><?php the_content();?></div> | |
</article></li> | |
<?php | |
endwhile;?> | |
</ul> | |
<?php | |
endif; | |
// Reset Post Data | |
wp_reset_postdata(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment