content-adullact.php 2.11 KB
Newer Older
1 2 3 4 5 6
<?php
/**
 * affiche un article seul. il est appelé depuis index.php lors de l'affichage d'une actualité.
 */

?>
7
<article id="post-<?php the_ID(); ?>" <?php post_class("adullact-post"); ?>>
8 9 10 11 12 13 14 15 16 17 18
    <?php
    if (is_sticky() && is_home()) :
        echo twentyseventeen_get_svg(array('icon' => 'thumb-tack'));
    endif;
    ?>
    <header class="entry-header">
        <?php
        if ('post' === get_post_type()) {
            echo '<div class="entry-meta">';
            if (is_single()) {
                twentyseventeen_posted_on();
19
            }
20 21 22 23 24 25 26 27
            echo '</div><!-- .entry-meta -->';
        };

        if (is_single()) {
            the_title('<h1 class="entry-title">', '</h1>');
        } elseif (is_front_page() && is_home()) {
            the_title('<h3 class="entry-title"><a href="' . esc_url(get_permalink()) . '" rel="bookmark">', '</a></h3>');
        } else {
N. Peraldi's avatar
N. Peraldi committed
28
            the_title('<h2 class="entry-title"><a href="' . esc_url(get_permalink()) . '" rel="bookmark">', '</a></h2>');
29
        }
30 31 32 33 34 35
        if ( is_single() ) {
            twentyseventeen_posted_on();
        } else {
            echo twentyseventeen_time_link();
            twentyseventeen_edit_link();
        };
36 37 38 39 40 41
        ?>
    </header><!-- .entry-header -->

    <?php if ('' !== get_the_post_thumbnail() && !is_single()) : ?>
        <div class="post-thumbnail">
            <a href="<?php the_permalink(); ?>">
N. Peraldi's avatar
N. Peraldi committed
42
                <?php the_post_thumbnail('post-thumbnail', array("class" => "adullact-post-image")); ?>
43 44 45 46 47 48
            </a>
        </div><!-- .post-thumbnail -->
    <?php endif; ?>

    <div class="entry-content">
        <?php
49
        the_content("<span class='adullact-read-more'>Lire la suite...</span>");
50

51 52 53 54 55 56 57 58 59 60
        wp_link_pages(
            array(
                'before' => '<div class="page-links">' . __('Pages:', 'twentyseventeen'),
                'after' => '</div>',
                'link_before' => '<span class="page-number">',
                'link_after' => '</span>',
            )
        );
        ?>
    </div><!-- .entry-content -->
61

62 63 64
    <?php
    twentyseventeen_entry_footer()
    ?>
65

66
</article><!-- #post-<?php the_ID(); ?> -->