I was trying to come up with something for this month to get another blog post in, and was just clicking through my site when I realized that the tagging feature was missing something - when you select a tag and view the list of posts that match that tag, there's no visual indicator that shows you're viewing a filtered list of posts:
Luckily, that's a super easy fix! I'm already checking for that param to modify a SQL statement that selects which blog posts to display, so I can just tie in to the same code and write a little HTML snippet that indicates the selected tag at the top of the list of posts.
// ... some other PHP stuff
echo '<section>';
echo '<h3><div class="tag_header"><img src="/images/tag.png" class="tag">posts tagged "'.$selected_tag.'"</div></h3>';
echo '</section>';
// ... more PHP stuff
I also made a tiny little pixel image of a "tag" (
) that kinda matches the custom bullets I made for the site to keep the visual style consistent. I initially used the label emoji but I didn't like the way it looked with the rest of the site - too much color and detail. That along with a little styling and we end up with a nice little "posts tagged with" header whenever you filter posts by tag!
And that's it for today. I'll probably have another, non-blog related post of some sort soon, but now I've managed to make at least one post a month every month this year, and I've added at least two features to the blog, so we'll call this a great success. Peace.