|
/ Documentation /Spectra One/ Create a Custom Post Type Archive Template Using ACF Spectra One Theme

Create a Custom Post Type Archive Template Using ACF Spectra One Theme

This guide will walk you through the steps of creating a custom post type (CPT) archive template using Advanced Custom Fields (ACF) with the Spectra One theme, a Full Site Editing (FSE) theme.

We’ll use the example of setting up an archive page for a custom post type called “Movie.” This process will allow you to display a list of all posts from that CPT on a dedicated archive page, designed just the way you want.

Let’s get started!

How to Create a Custom Post Type Archive

To begin, you’ll need the ACF plugin installed on your WordPress site. ACF (Advanced Custom Fields) is a powerful plugin that enhances your WordPress capabilities by allowing you to create custom post types, fields, and more.

Simply go to Plugins > Add New in your dashboard, search for Advanced Custom Fields, and hit Install.

Once it’s installed, click the Activate button to make sure the plugin is ready to use. ACF will now appear in your dashboard menu.

Now that ACF is active, the next step is to create your custom post type.

  • Navigate to ACF > Post Types in your WordPress dashboard.
  • From here, click Create New to add a brand new custom post type.

In this example, let’s call the new custom post type Movie. This could be anything based on your site’s needs, whether it’s movies, books, events, or any other content type you want to manage separately.

Once you’ve named your custom post type, you’ll need to configure its settings.

  • Under Post Type Settings, enable Advanced Configuration.
  • Go to the URLs section and enable Archive toggle.
  • Ensure that the Archive Slug is added. This will define the URL for the archive page of your custom post type (e.g., /movie).
  • After configuring the settings, click on Save Changes.

Creating the Template for the Custom Post Type Archive

Creating the archive page template will be done through WordPress’s Full Site Editor (FSE), which is a feature of the Spectra One theme.

  • Navigate to Appearance > Editor from your WordPress dashboard.
  • Once inside the editor, go to Templates.
  • Click on Create New Template.
  • You should see an option for Post Type: Archives. In this case, it will be specific to your custom post type, like Movie: Archives.
  • Select this option to create a custom archive template for the “Movie” post type.

Once the new template is created, it’s time to customize it to match the look and feel of your website.

  • Use the FSE editor to design and customize the layout of your archive page.
    • You can add a Post Title Block, Post Content Block, Post Excerpt Block, etc., depending on your preferences.
    • Customize the typography, layout, and other design elements.
  • Once you’re satisfied with the design, click on Save Changes.

How Do You View the Custom Archive Page?

Once the template is set up, it’s time to view your custom archive page.

  • Go to the frontend of your site.
  • In the browser’s address bar, append the archive slug to the home page URL. For example:
    yourwebsite.com/movie
  • You should now see the archive page for your custom post type (Movie) displaying the page as per template that you have created for the same.

With these steps, you’ll have successfully created a custom post type and a template for the archive page of the same using ACF and the Spectra One theme!

For a clear visual guidance, you can watch the below embedded video.

By following these steps, you’ll have successfully created a custom post type and designed a unique archive page template for it using ACF and the Spectra One theme.

This process allows you to manage and display custom content in a way that fits your website’s needs perfectly.

We hope this guide was helpful! If you have any questions or need further assistance, feel free to leave a comment, and we’ll be happy to help.

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

On this page

Get Notified When Available

Note - You can purchase the Essential Toolkit now and easily upgrade to the Business Toolkit once it becomes available.

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

Get your hands on Spectra Pro

Enter your name and email address to get access to Spectra Pro.