Applying a Template to a Custom Post Type

Custom Post Types Overview

In WordPress, while the core software comes with default content types like posts and pages, there’s the flexibility to create custom post types to cater to specific content needs. A custom post type can be anything from a “Listing” to a “Review” or any other type of content.

With Breakdance, you can design and apply templates to these custom post type.

Applying a Template to a Custom Post Type

1. Confirming Custom Post Type Setup

  1. Ensure that your custom post type is set up. This could be done using a plugin like “Advanced Custom Fields” or any other custom post type plugin. Alternatively, you could set up custom post types using code. The main prerequisite is that the post type should be viewable on the front end.
  2. For this example, let’s assume you’ve set up a custom post type named “Listings”.

2. Creating the Template for the Custom Post Type

  1. Log into your WordPress dashboard and go to Breakdance -> Templates.
  2. Click on Add Template and then choose Add Custom Template.
  3. Name your template. For this example, we’ll call it “Listing” in alignment with the custom post type name.
  4. Under the Location dropdown, navigate to Single.
  5. Within the available options, look for your custom post type. If you set up a custom post type named “Listings”, choose “Listings”.
  6. Now, you can design the template, and it will apply to content published under the “Listings” custom post type.