add main posts pagination, fix tag links
This commit is contained in:
parent
5247cb5331
commit
2ac3f742b5
2 changed files with 11 additions and 4 deletions
|
@ -32,12 +32,11 @@ namespace WP_73k;
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (has_tag()) {
|
if (has_tag()) {
|
||||||
echo '<div class="post-tags fs-smaller mb-4">' . svg_icon_use("mdi-tag-multiple", "icon baseline text-gray-300 me-1");
|
echo '<div class="post-tags fs-smaller mb-4">';
|
||||||
|
echo svg_icon_use("mdi-tag-multiple", "icon baseline text-gray-300 me-1");
|
||||||
|
|
||||||
$tag_strings = array_map(function ($tag) {
|
$tag_strings = array_map(function ($tag) {
|
||||||
$tag_str = '<span class="text-gray-300">#</span>';
|
return '<span class="text-gray-300">#</span><a href="' . get_tag_link($tag) . '">' . $tag->name . '</a>';
|
||||||
$tag_str .= '<a href="' . get_bloginfo('url') . '/tag/' . $tag->slug . '">' . $tag->name . '</a>';
|
|
||||||
return $tag_str;
|
|
||||||
}, get_the_tags());
|
}, get_the_tags());
|
||||||
|
|
||||||
echo implode(", ", $tag_strings) . '</div>';
|
echo implode(", ", $tag_strings) . '</div>';
|
||||||
|
|
|
@ -18,6 +18,14 @@ get_header(); ?>
|
||||||
the_post();
|
the_post();
|
||||||
echo get_template_part( 'content-templates/content', 'article' );
|
echo get_template_part( 'content-templates/content', 'article' );
|
||||||
}
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<nav class="d-flex justify-content-between" aria-label="Page navigation">
|
||||||
|
<div class="nav-previous alignleft"><?php next_posts_link( '← Older' ); ?></div>
|
||||||
|
<div class="nav-next alignright"><?php previous_posts_link( 'Newer →' ); ?></div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue