?>
        </h1><!-- /.post__title -->

        <div class="post__meta">
            <p class="post__date published"><?php 
printf(__('on %s', env('TEXT_DOMAIN')), get_the_date());
?>
</p>
            <p class="post__author"><?php 
printf(__('by <a href="%1$s" class="author vcard fn">%2$s</a>', env('TEXT_DOMAIN')), get_author_posts_url(get_the_author_meta('ID')), get_the_author());
?>
</p>
        </div><!-- /.post__meta -->

        <?php 
echo get_categories_list();
?>
    </header><!-- /.post__header -->

    <div class="post__content <?php 
echo is_single() ? 'entry-content' : 'entry-summary';
?>
">
        <?php 
if (is_single()) {
    ?>
            <?php 
    the_content();
    ?>

            <?php 
Example #2
0
?>

<!DOCTYPE html>
<html lang="fr">
	<?php 
include_once 'views/head.php';
?>
	<body>
		<?php 
include_once 'views/nav.php';
?>

				<?php 
$json = get_json();
if ($json) {
    $list = get_categories_list($json);
    echo '<ul class="categories">';
    echo '<li>CATÉGORIES :</li>';
    foreach ($list as $categorie) {
        echo '<li><a href="?categorie=' . $categorie . '"><i class="fa fa-tag"></i> ' . ucfirst($categorie) . '</a></li>';
    }
    echo '</ul>';
    if ($_GET) {
        display_list_products(products_by_categories($json, $_GET['categorie']));
    } else {
        display_list_products($json['products']);
    }
}
?>

		<?php