diff --git a/content-templates/content-article.php b/content-templates/content-article.php index e1a2900..a6e7610 100644 --- a/content-templates/content-article.php +++ b/content-templates/content-article.php @@ -32,12 +32,11 @@ namespace WP_73k; <?php 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_str = '<span class="text-gray-300">#</span>'; - $tag_str .= '<a href="' . get_bloginfo('url') . '/tag/' . $tag->slug . '">' . $tag->name . '</a>'; - return $tag_str; + return '<span class="text-gray-300">#</span><a href="' . get_tag_link($tag) . '">' . $tag->name . '</a>'; }, get_the_tags()); echo implode(", ", $tag_strings) . '</div>'; diff --git a/index.php b/index.php index 7350012..f6a0e03 100644 --- a/index.php +++ b/index.php @@ -18,6 +18,14 @@ get_header(); ?> the_post(); 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 } ?>