1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
<?php get_header(); ?>
<div class="section col-lg-10 col-lg-offset-1 home-template">
<!--Mettre un seul post sur page accueil-->
<?php query_posts('cat=1&posts_per_page=1'); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="col-lg-12">
<div class="row">
<div class="img-article col-lg-12"><?php if (has_post_thumbnail()) the_post_thumbnail(); ?></div>
<div class="col-lg-12 separation-index">
<h1 class="title-article col-lg-6 col-md-6 col-sm-6 col-xs-12"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
<p class="col-lg-6 col-md-6 col-sm-6 col-xs-12 info-title-article"><?php _e('Posted on', 'h5'); ?> <?php the_time('F jS, Y'); ?> <?php _e('by', 'h5'); ?> <?php the_author(); ?></p>
</div>
</div>
</header>
<section class="col-lg-12">
<div class="description-article-index col-lg-12">
<?php the_excerpt(); ?>
</div>
</section>
<footer class="col-lg-12 footer-index">
<div class="row">
<div class="col-lg-12">
<?php the_tags('<p class="tags">Tags: ', ', ', '</p>', '<br>'); ?>
</div>
<div class="col-lg-12 separation-footer">
<div class="topic"><?php _e('TOPIC : ', 'h5'); ?> <?php the_category(', '); ?> </div>
</div>
</div>
</footer>
<div class="col-lg-12 latest-post">
<?php echo do_shortcode('[frontpage_news widget="124" name="Last post"]'); ?>
</div>
</article>
<?php endwhile; ?>
<?php else : ?>
<article>
<h1><?php _e('Not Found', 'h5'); ?></h1>
<p><?php _e('Sorry, but the requested resource was not found on this site.', 'h5'); ?></p>
<?php get_search_form(); ?>
</article>
<?php endif; ?>
</div>
<?php get_footer(); ?> |
Partager