Template Locations

What Are Template Locations in Breakdance

Breakdance offers a comprehensive system for defining where templates should be applied on a website. Every template in Breakdance has a Location.

The available template Locations can be seen as a broad categories while conditions allow for finer control within these categories. By leveraging both locations and conditions, you can apply templates exactly where you want to.

Understanding Breakdance Template Locations

Adding a Template & Setting It’s Location

  1. Start by logging into your WordPress dashboard and proceed to Breakdance -> Templates.
  2. To add a new template, choose Add Template and then Add Custom Template.
  3. Inside the template creation dialog, there’s a dropdown labeled Location. This dropdown contains all the available template locations.

Different Types of Locations

  1. Everywhere: Selecting this option applies the template across all areas of your site, from pages, posts, archives, etc.
  2. Single Locations: These refer to specific WordPress content that displays individually. Examples include individual posts, pages, or custom post types. If you’re familiar with WordPress themes, these relate to single.php and singular.php. For details, read the article dedicated to single templates.
  3. Archive Locations: These are for grouped content, like a collection of posts under a category, tag, or date. Options here encompass general archives, product archives, taxonomy archives, date archives, and more. For details, read the article dedicated to archive templates.
  4. Specific Locations: Breakdance also provides options to target templates for unique locations such as the “404 Not Found” error page and search results.
  5. Custom Post Types: If you have custom post types set up and they are viewable on the front end, they will appear in the single section.
  6. Custom Taxonomies: If you have custom taxonomies set up and they are viewable on the front end, they will appear both in the archive section.

Combining Locations with Conditions

Once a location is chosen, you’ll be prompted to set conditions. While the location provides a broad area where the template will apply, conditions allow you to narrow down its application within that area. For a detailed walkthrough on using conditions, refer to our dedicated article on template conditions.