Archive Templates

What Are Archive Templates

In WordPress, while singular templates are designed for individual content items, archive templates cater to collections of content. These templates are utilized when showcasing sets of posts or custom post types categorized under specific taxonomies or terms. For instance, when a user navigates to a category like “Travel,” an archive page lists all the posts under that category. Similarly, tags in WordPress have their own archive pages. Clicking on a tag like “Photography” would display all posts associated with that term.

WooCommerce applies the concept of archives to online stores. When a shopper clicks on a product category such as “Shoes,” they are directed to a product category archive that lists all items within that category. WooCommerce products can be tagged with descriptors, much like standard WordPress posts. Clicking on a product tag, for example “Waterproof” or “Vegan” could take you to an archive page presenting all products labeled with that specific tag.

Creating an Archive Template in Breakdance

1. Starting the Process

  1. Begin by logging into your WordPress dashboard.
  2. Navigate to Breakdance -> Templates.

3. Setting Up the Archive Template

  1. Click on Add Template.
  2. Choose Add Custom Template.
  3. Give your template a name.
  4. Under the Location section, click Apply Template To.
  5. Choose an archive location from the dropdown – for example, Taxonomy Archive.
  6. Assuming you chose Taxonomy Archive, to specify which taxonomy this template applies to, add a condition. Choose the Is Taxonomy condition, and choose the taxonomy / terms – for example, you could choose All Post Tags, or specify individual tags if desired.
  7. Click Add Template to establish your archive template.

4. Customizing the Archive Template

  1. Hover over your newly created template and select Edit in Breakdance.
  2. Begin designing. Include a Posts List or Post Loop Builder element to showcase the posts under the respective archive.
  3. Once satisfied with the design, click Save.

5. Viewing the Archive Template in Action

  1. In Breakdance, click the X, and then choose Exit to Frontend.
  2. Or, head back to the WordPress dashboard and then navigate to the archive, for example, to view a tag archive, navigate to Posts -> Tags and then click View beside a tag to open its archive page.
  3. Your custom-designed archive template will now be displayed.