I am currently using the sidebar in WordPress and displaying "Archive" and "Popular Tags" in the side column.
Example - Archive Code
<div class="populartags">
<?php
$tags = get_tags();
$html = '<div class="post_tags">';
foreach ( $tags as $tag ) {
$tag_link = get_tag_link( $tag->term_id );
$html .= "<a style='color:#333;' href='{$tag_link}' title='{$tag->name} Tag' class='{$tag->slug}'>";
$html .= "{$tag->name}</a>";
}
$html .= '</div>';
echo $html;
?>
</div>
The tags that were used in the message are displayed here. I also have an Archive (Dates) -
<?php wp_get_archives(); ?>
These pages go to archive.php, which is great. What I will tie to achieve. Is a line of text that says
'Here are the posts for (Archive / Tag).
So, if I looked at the posts from May 2015. He would say: βHere are the messages for May 2015β
Does anyone have any ideas?
user2209033
source
share