Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Create Compact Archives in WordPress

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

Do you want to create compact archives on your WordPress website?

If you have been blogging for a few years, then the list of your posts might have become too long to fit in your WordPress sidebar. This will make your sidebar look cluttered, which won’t be good for your site presentation.

In this article, we will show you how to easily create compact archives in WordPress.

How to create compact archives in WordPress

Why Do You Need Compact Archives in WordPress?

Adding an archive on your WordPress site allows you to easily display your previously published content, increasing engagement and time spent on your website.

By default, WordPress offers an Archives block that can be added to the sidebar of your WordPress blog.

However, this block only allows you to display your archives as a long list or a dropdown menu.

A list will make your site look cluttered, while a dropdown menu can be easily overlooked by users as it is not noticeable.

The default archive block in WordPress

By creating compact archives, you can easily display your archives in the WordPress sidebar without taking up much space. You can also show them on your About page or even create a dedicated Archives section.

Compact archives will make it easier for users to navigate through your site and find relevant content, enhancing the user experience.

Archives can even boost your search engine rankings and attract more organic traffic by making it easier for search engine bots to crawl and index your content.

That being said, let’s take a look at how to easily add compact archives in WordPress, step by step:

How to Add Compact Archives in WordPress

First, you need to install and activate the Compact Archives plugin. For detailed instructions, you may want to see our beginner’s guide on how to install a WordPress plugin.

Now, the plugin offers three styles to display compact archives on your website.

Style 1: Relaxed Three-Letter Month Initials

Style one of the compact archives

Style 2: Compact Monthly Initials

Style two of compact archives

Style 3. Numeric Block

Style three of the compact archives

There are multiple ways to easily display compact archives.

In this tutorial, we will be showing you all four methods, and you can choose the one that you like the most.

Method 1: Add Compact Archives in WordPress Posts or Pages

If you want to add compact archives to your WordPress posts or pages, then this method is for you.

It is super easy to add compact archives because the plugin comes with an easy-to-use block that you can add to your post or page.

First, you need to open an existing or new post/page from the WordPress admin sidebar.

Once you are there, click the ‘Add Block’ (+) button at the top left corner of the screen to open up the block menu.

From here, find and add the WPBeginner’s Compact Archives block to your WordPress post or page.

Add the Compact archives block to a page

After that, you can choose a style for your archives from the block panel in the right corner of the screen.

Simply choose a style of your liking from the dropdown menu under the ‘Select Archive Type’ option.

Select an archive type

You can also select if you want your archive text to be capitalized or uppercase.

To do this, you must open the dropdown menu under the ‘Transform Text’ option and choose a text style of your liking.

Select the archive text from the dropdown menu

Once you are satisfied with your choices, simply click the ‘Publish’ or ‘Update’ button to store your settings.

Now, you can visit your WordPress site to view your archives page.

Archives preview

Method 2: Add Compact Archives as a Widget

If you want to add compact archives as a widget, then this method is for you.

Adding the Compact Archives Block in Full Site Editor

If you are using a block-based theme on your website, then you will have to add the WPBeginners’ Compact Archives block using the full site editor.

First, you need to visit the Appearance » Editor page from the WordPress admin sidebar to launch the full site editor.

From here, click the ‘Add Block’ (+) button at the top-left corner of the screen to open up the block menu.

Next, simply locate and add the WPBeginner’s Compact Archives block to your preferred place on the website.

Add the compact archives block in the FSE

Once you have added the block, you can configure its style and text settings from the block panel on the right.

Finally, don’t forget to click on the ‘Save’ button at the top to store your settings.

Configure the Compact archives settings in FSE

Now, visit your website to view your compact archives.

This is how it looked like on our demo site.

Compact archives in FSE

Adding the Compact Archives Block Using Widgets

If you are not using a classic WordPress theme, then this method is for you.

First, you have to visit the Appearance » Widgets page from the WordPress dashboard.

Once you are there, click the ‘Add Block’ (+) button at the top left corner to open up the block menu.

From here, locate and add the WPBeginner’s Compact Archives block to the sidebar tab.

Add the Compact archives block to the sidebar

Once the Compact Archives block has been added, you can change the style and text of your archive by configuring the block settings in the panel on the right.

Finally, don’t forget to click the ‘Update’ button at the top to save your changes.

Configure the block settings of the compact archives and click Update button

You can then visit your website to see the compact archives in your sidebar.

It looked like this on our demo site.

Compact archive preview in sidebar

Method 3: Displaying Compact Archives in Template Files

If you are making a custom WordPress theme or want to display archives in a theme template file, Compact Archives comes with handy template tags that you can use.

Simply add the following template tag to your code:

<ul> <?php compact_archive(); ?> </ul>

After adding the tag, compact archives will be added to your WordPress page.

However, if you want to add a style to your archive, you can do so by adding the following template tag in your code:

<ul>
<?php compact_archive($style='initial', $before='<li>', $after='</li>'); ?>
</ul>

For example, $style == 'initial' will display only month name initials and should fit right inside a sidebar. Using$style == 'block' will fit the main column of a page. Using $style == 'numeric' will display numeric months.

Method 4: Add Compact Archives to Your HTML Sitemap

If you want to create an HTML sitemap page in WordPress and display your compact archives with it, then this method is for you.

All in One SEO is the best WordPress SEO plugin on the market that allows you to easily optimize your website for search engines and boost your rankings.

It even lets you easily add an HTML sitemap to your WordPress site.

The AIOSEO website

First, you will need to install and activate the All in One SEO for WordPress plugin. For more details, see our tutorial on how to install a WordPress plugin.

Note: AIOSEO also has a free version that you can use to create an HTML sitemap. However, we will be using the premium plan for more features.

Upon activation, the plugin will launch the setup wizard. Simply follow the on-screen instructions to set up the plugin or see our guide on how to properly set up All in One SEO for WordPress.

Once you have done that, head over to the All in One SEO » Sitemaps page from the WordPress admin sidebar.

From here, switch to the ‘HTML Sitemap’ tab from the top and make sure that the ‘Enable Sitemap’ toggle is turned on.

Toggle the Enable Sitemap switch

Next, you need to choose how you want to display your HTML sitemap. You can display your sitemap using a shortcode, PHP code, a block, or as a widget.

For this tutorial, we will be choosing the ‘Gutenberg Block’ option.

If you choose this method, then you will have to add the AIOSEO – HTML Sitemap block to the page where you wish to display the sitemap.

For more detailed instructions, you may want to see our tutorial on how to add an HTML sitemap page in WordPress.

Choose the Gutenberg block

Next, you need to scroll down to the ‘Compact Archives’ option in the ‘HTML Sitemap Settings’ section.

From here, simply toggle the ‘Compact Archives’ switch to ‘Enabled’.

Keep in mind that you don’t need to install the Compact Archives plugin for this feature to work.

Now, your HTML sitemap will be displayed in a compact date archive format.

Toggle the compact archives switch to Enabled

Finally, don’t forget to click on the ‘Save Changes’ button to store your settings.

Next, open up an existing or new page where you want to display the sitemap from the admin sidebar.

From here, simply click on the ‘Add Block’ (+) button at the top and add the AIOSEO-HTML Sitemap block to your page.

Add the AIOSEO-HTML Sitemap block to your page

Finally, don’t forget to click the ‘Publish’ or ‘Update’ button to save your changes.

Your compact archives HTML Sitemap will look like this.

Compact archives as HTML sitemap

Bonus: Create a Custom Archives Page in WordPress

Apart from adding an archives block to an existing page, you can also create a custom archives page on your WordPress site with SeedProd.

It is the best WordPress page builder on the market that comes with a drag-and-drop builder, premade templates, and a ‘Posts’ block that allows you to display your blog posts attractively.

SeedProd Website and Theme Builder

First, you need to install and activate SeedProd. For detailed instructions, see our beginner’s guide on how to install a WordPress plugin.

Upon activation, visit the SeedProd » Landing Pages section from the WordPress dashboard and click the ‘Add New Landing Page’ button.

Click the Add New Landing Page button

This will take you to the ‘Choose a New Page Template’ screen, where you will notice numerous premade templates offered by SeedProd that you can use on your site.

Once you choose a template, it will be launched in SeedProd’s drag-and-drop builder where you can customize it according to your liking using blocks from the left column. For details, see our tutorial on how to create a landing page in WordPress.

Add posts block in SeedProd

Now, to display your posts on the Archives page, simply locate and add the ‘Posts’ block from the left column.

After that, you can choose the layout for the block, select the order, configure pagination, use columns, and so much more.

Once you are satisfied, don’t forget to click the ‘Save’ and ‘Publish’ button at the top to store your settings.

For more information, you may want to see our tutorial on how to create a custom archives page in WordPress.

Customize the custom archives page

We hope this article helped you learn how to easily create compact archives in WordPress. You may also want to see our beginner’s guide on how to create an email newsletter in WordPress and our top picks for the best social media plugins to help promote your website.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

11 CommentsLeave a Reply

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Janice Daniels says

    I would like to organize articles written by name categories, not dates. Is there a way to how a page with titles such as Elections or Songs and have a brief commentary of what the post says with a link to the full post?

  3. Amy Sue says

    The “By Date” portion of Compact Archives isn’t working on my blog. I’m wondering if that’s because I had to move my blog to a new web host, or did I mess something up in it? I know enough html/css to be dangerous but usually code via the “trial and error and error and error” method so I probably messed something up…

  4. Hariharakumar says

    This one works best for default posts. My blog has custom posts I want to display them as well in compact archives. What should I do now?

  5. Dan says

    Please update this plugin. It seems to cause numerous update issues for other plugins now because it hasn’t been updated in over two years.

  6. Vince says

    This plug-in hasn’t been updated in two+ years, and in particular hasn’t been updated to get rid of the deprecated-as-of-4.3 old constructor calling. Nor have you responded to any of the support requests in the last year.

    Are you still supporting this plugin?

  7. Ameya says

    Hi,

    I’d like to know if there is anything special in this plugin? I use SRG Clean Archives. Do you know anything about this plugin? Is it better or I should use the one you suggested?

    Ameya

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WPBeginner Assistant
How can I help you?

By chatting, you consent to this chat being stored according to our privacy policy and your email will be added to receive weekly WordPress tutorials from WPBeginner.