Yuzu Theme
from meowapps.com
This commit is contained in:
83
tag.php
Normal file
83
tag.php
Normal file
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying a tag
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package Yuzu
|
||||
*/
|
||||
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div id="primary" class="content-area">
|
||||
<main id="main" class="site-main">
|
||||
|
||||
<div class="single-page">
|
||||
<div class="page-header medium-container">
|
||||
<div class="label">
|
||||
<?php _e('Tag', 'yuzu'); ?>
|
||||
</div>
|
||||
<h1 class="page-title"><?= get_queried_object()->name; ?></h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="articles-list large-container top-and-bottom-margin">
|
||||
<?php
|
||||
if ( have_posts() ) :
|
||||
|
||||
/* Start the Loop */
|
||||
$count = 0;
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
switch($count) {
|
||||
case 0:
|
||||
echo '<div class="row">';
|
||||
require get_template_directory() . '/components/article-cards/large-article-card.php';
|
||||
echo '</div>';
|
||||
$count++;
|
||||
break;
|
||||
case 1:
|
||||
echo '<div class="row">';
|
||||
require get_template_directory() . '/components/article-cards/medium-article-card.php';
|
||||
$count++;
|
||||
break;
|
||||
case 2:
|
||||
require get_template_directory() . '/components/article-cards/medium-article-card.php';
|
||||
echo '</div>';
|
||||
$count++;
|
||||
break;
|
||||
case 3:
|
||||
echo '<div class="row">';
|
||||
require get_template_directory() . '/components/article-cards/small-article-card.php';
|
||||
$count++;
|
||||
break;
|
||||
case 4:
|
||||
require get_template_directory() . '/components/article-cards/small-article-card.php';
|
||||
$count++;
|
||||
break;
|
||||
case 5:
|
||||
require get_template_directory() . '/components/article-cards/small-article-card.php';
|
||||
echo '</div>';
|
||||
$count = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
endwhile;
|
||||
|
||||
the_posts_navigation();
|
||||
|
||||
else :
|
||||
|
||||
_e('No posts found!', 'yuzu');
|
||||
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
|
||||
</main><!-- #main -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
<?php
|
||||
get_footer();
|
||||
Reference in New Issue
Block a user