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
Begin by logging into your WordPress dashboard.
Navigate to Breakdance -> Templates.
3. Setting Up the Archive Template
Click on Add Template.
Choose Add Custom Template.
Give your template a name.
Under the Location section, click Apply Template To.
Choose an archive location from the dropdown – for example, Taxonomy Archive.
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.
Click Add Template to establish your archive template.
4. Customizing the Archive Template
Hover over your newly created template and select Edit in Breakdance.
Begin designing. Include a Posts List or Post Loop Builder element to showcase the posts under the respective archive.
Once satisfied with the design, click Save.
5. Viewing the Archive Template in Action
In Breakdance, click the X, and then choose Exit to Frontend.
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.
Your custom-designed archive template will now be displayed.