Creating a regular stream of content helps bring visitors to your site. But making that content readily available when they visit helps people find what they’re looking for. And setting up WordPress to show a compact archives section helps in that process.
This is especially valuable if you have articles that center around time and place. And if your website is up and running for years on end, this list of content can get quite extensive.
In this tutorial, I’m going to show you how to make WordPress show compact archives on both a dedicated page as well as a sidebar widget.
Using Compact Archives
Compact Archives is a great WordPress archive plugin to show visitors a list of years and months for your archives. This lets people browse according to specific time frames.
This plugin comes with a widget and shortcode, which I’ll show you how to use in a moment.
Install and activate the “Compact Archives” plugin.
Using the Shortcode on a Page
First, let’s see what the plugin does on a dedicated webpage.
Let’s create a new page in WordPress.
Give the page a unique name. For this tutorial, I’m simply calling it “Archives.”
Insert the following shortcode for Compact Archives:[ht_message mstyle=”info” title=”” show_icon=”” id=”” class=”” style=”” ][compact_archive][/ht_message]
Click the “Publish” button for the page.
Now, you’ll have a WordPress archive page.
What else can you do with the shortcode? This plugin supports style, before and after functions for shortcodes.
For instance, you can use this shortcode to create a block layout:[ht_message mstyle=”info” title=”” show_icon=”” id=”” class=”” style=”” ][compact_archive style=”block”][/ht_message]
How does the before and after work? Using the commands “before” and “after” give you the ability to add basic HTML to your WordPress category archive.
For example, this shortcode will center the archive on the page:[ht_message mstyle=”info” title=”” show_icon=”” id=”” class=”” style=”” ][compact_archive style=”block” before=”
The important thing to note is how the shortcode shows each archived year. Technically, each year is its own line. Which means if you add text at the “before” or “after,” it will show on each line.
However, you could put something like this to add more flair with italics and bold:[ht_message mstyle=”info” title=”” show_icon=”” id=”” class=”” style=”” ][compact_archive style=”block” before=”
Using the Widget
Compact Archives also comes with a widget you can use for the sidebar of your website.
Go to Appearance and click, “Widgets.”
Drag and drop “Compact Archives Widget” into a sidebar.
Give the widget a title. This will show on your website’s sidebar. I’m going to leave it as default for now.
Use the drop down to change the style. You have initials, block or numeric, depending on what you want to display.
Use the Transform text option to change typography. By default, “UPPERCASE” is selected, which means all letters in the archive field will be in capitals.
Click the “Save” button to commit changes.
Now, WordPress will show archive posts by month in the sidebar.
As you can see, it would probably look better if I change the style so it’s not so bulky in the theme I am using.
This is how it looks with a numeric style:
Other Plugins of Interest
The above isn’t the only plugin that will make WordPress show a compact archives section. Here are a few other options you can explore. Perhaps one of these will fit your needs better than Compact Archives.
Annual Archive is a sidebar widget with extensive options for displaying various types of content. You can show specific dates of content, show certain custom post types and add your own text before or after the list.
List Category Posts
List Category Posts comes with a myriad of shortcode options that let you fine-tune what content you show. As shortcodes are usable on pages, posts and in text widgets, you can display these specifics virtually anywhere in WordPress.
Collapsed Archives uses CSS to streamline the archive sidebar widget. This means it’s not a hindrance on site performance while offering a sleek way to keep the archive clean and functional. You can also include the number of posts available in each archive.
Keep the Site Clean
Adding too much to your site can make it look cluttered. The tools above will help you keep the site manageable and appearing professional. It will impact how others view your posts and pages.
Remember, first impressions are vital.
What plugins do you use to keep your site managed and clean? Do you find an archive page helpful for your visitors?