tags on article page

This commit is contained in:
Ross Trottier 2024-08-20 11:11:17 -06:00
parent 05b49120d0
commit b9eec084c5
2 changed files with 15 additions and 2 deletions

View File

@ -10,7 +10,7 @@
$post_id = get_the_ID(); $post_id = get_the_ID();
?> ?>
<h1 class="st-article__title"> <?php the_title(); ?> </h1> <h1 class="st-article__title"> <?php the_title(); ?> </h1>
<a href="<?php echo get_author_posts_url( $post->post_author ); ?>" class="st-article-page__author-link"> <a href="<?php echo get_author_posts_url($post->post_author); ?>" class="st-article-page__author-link">
<div class="st-article__author-box"> <div class="st-article__author-box">
<div class="st-article__author-name"> <div class="st-article__author-name">
<?php the_author() ?> <?php the_author() ?>
@ -21,6 +21,15 @@
</div> </div>
</a> </a>
<?php the_content(); ?> <?php the_content(); ?>
<h4>Tags:</h4>
<?php
$tags = get_the_tags();
if ($tags) {
foreach ($tags as $tag) {
echo '<a class="st-chip st-chip-primary st-chip-tag-cloud" href="' . get_tag_link($tag->term_id) . '">' . $tag->name . '</a>';
}
}
?>
<?php <?php
if (function_exists('get_field')) { if (function_exists('get_field')) {
$related_posts = get_field('related_posts', $post_id); $related_posts = get_field('related_posts', $post_id);
@ -64,7 +73,7 @@
</section> </section>
</section> </section>
<section class="st-article-section-grid st-article-section-grid__article-page"> <section class="st-article-section-grid st-article-section-grid__article-page">
<section class="st-ad-section-long-post-end st-article"> <section class="st-ad-section-long-post-end st-article">
<?php <?php
if (function_exists('the_ad_group')) { if (function_exists('the_ad_group')) {

View File

@ -1038,6 +1038,10 @@ COMPONENTS
letter-spacing: 1px; letter-spacing: 1px;
} }
.st-chip-tag-cloud {
margin-right: .5em;
}
@media (min-width: 1200px) { @media (min-width: 1200px) {
.st-icon-bar-sticky .st-chip { .st-icon-bar-sticky .st-chip {
margin-top: auto; margin-top: auto;