> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wpbevel.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Theme Builder

> Headers, footers, single, archive, search and 404 templates with display conditions, on any theme.

**Bevel → Theme Builder** is where the site's frame is built: the header and footer, what a post looks like, what an archive looks like, the 404 page. Each is an Elementor template with **display conditions** that say where it shows. The most specific condition wins.

## Template types

| Type                     | Location                       | Default condition                                       |
| ------------------------ | ------------------------------ | ------------------------------------------------------- |
| Header                   | header                         | Entire Site                                             |
| Footer                   | footer                         | Entire Site                                             |
| Single                   | single                         | none; starts with Post Title and Post Content widgets   |
| Single Post              | single                         | Posts                                                   |
| Single Page              | single                         | Pages                                                   |
| Archive                  | archive                        | All Archives                                            |
| Search Results           | archive                        | Search Results                                          |
| 404 Page                 | single                         | 404 Page                                                |
| Section                  | chosen per template            | Entire Site                                             |
| Popup                    | popup                          | none, on purpose. See [Popups](/kit/popups)             |
| Mega Menu                | assigned in Appearance → Menus | none. See [Mega Menu](/kit/mega-menu)                   |
| Loop Item                | placed by a loop widget        | none. See [Loops](/kit/loops)                           |
| Product, Product Archive | single, archive                | Products, the shop. See [WooCommerce](/kit/woocommerce) |

Type names are Elementor Pro's, so templates built with Pro keep working.

## Creating a template

1. Click **New template**, pick a type and name it.
2. The editor opens. Under **Settings** in the panel you can set the template's HTML tag (div, header, footer, main, section, article, aside, nav), open **Display Conditions**, and choose what to **preview as**: a specific post, a term, an author, the blog home, the 404 page, or a search term.
3. Publish. The conditions dialog opens if none are set.

A section template needs a **Location** as well; every public location the theme registers is offered.

## Display conditions

Conditions are include or exclude rules over a tree:

* **Entire Site**
  * **Singular**: Front Page, the 404 page, and one entry per public post type. Each post type can be narrowed to a specific item, to *Direct Child Of* or *Any Child Of* a page, to posts *In* a taxonomy (or a specific term), or to posts *By Author*.
  * **Archives**: the blog, each post type archive, each public taxonomy (and a specific term, or children of one), Author Archive, Date Archive, Search Results.

How they resolve:

* Only published templates count.
* An exclude drops the template outright.
* Otherwise the most specific match wins: a named item beats its post type, the post type beats "all singular", which beats "entire site". Two equal matches: the newer template shows.
* Header, footer, single and archive show one template each. Popups and code snippets can show several.

When you save conditions the dialog reports **conflicts**: other published templates of the same location carrying the same include, with links to edit them.

## The list

The screen groups templates into **Site**, **Singles**, **Archives** and **Blocks**, with a search box and status filters. Each row shows where the template shows, its status and when it was edited, with these actions: Edit with Elementor, Preview, Conditions, Rename, Duplicate, Publish or Switch to draft, Move to trash, Restore, Delete permanently. Select several rows to export them together. Trash keeps items for the days WordPress is configured to keep them.

Elementor's own Templates list also gains a **Conditions** column.

## Import and export

**Export** one template as `.json`, or several as one `.zip` (up to 30). The file is in Elementor's own export shape, so it imports into any Elementor site; images are exported as URLs.

**Import** takes a `.json` or a `.zip` (8 MB, 30 entries). Imported templates land as **drafts with no conditions**, so nothing on the site changes until you publish one. Images referenced by URL are pulled into the media library.

Import needs the *edit posts* capability and Elementor's own JSON-upload permission.

## Locations and themes

Bevel Kit registers four core locations, **header**, **footer**, **single** and **archive**, and listens to Elementor Pro's theme-location hook as well as its own, so a theme written for Pro's theme builder works unchanged. On a theme that prints none of them, the Kit takes the page over with Elementor's full-width page template; a page that chose its own WordPress page template keeps it.

Theme authors: `bevel_do_location( 'header' )` prints a location, `bevel_location_exists( 'header' )` asks whether a template applies, and both Elementor Pro function names work as aliases when Pro is absent. Register your own locations on the `bevel/theme/register_locations` action. See [Hooks](/reference/hooks).

## Preview

"Preview changes" on a template opens a real front-end URL for the preview target, with the template forced on. Inside the editor the main query is switched to the preview target while the template renders, so dynamic tags and loop widgets show real content.

## Where the pieces are

The theme-builder widgets, Site Logo, Site Title, Page Title, Post Title, Post Excerpt, Post Content, Featured Image, Archive Title, Archive Posts, Search Form, Author Box, Post Comments, Post Navigation, Post Info, Sitemap and Breadcrumbs, are listed under [Widgets](/kit/widgets#theme-builder-widgets). The header's navigation is the [Nav Menu](/kit/mega-menu) widget.
