Adding blocks

Click Add Template Block to get another block for editing.

templateblockadd

 

Rearranging blocks

Template blocks can be moved up and down by clicking the split-arrow icon in the sort column and dragging it to the desired position.

templaterearranging

 

Deleting blocks

Template blocks can be deleted by clicking the trashcan icon on the right side delete column.

templateblockdelete

 

Selecting what to display (the Display dropdown)

Clicking the Display dropdown will present you with all available Fields, Taxonomies, Submission Options, and General (built-in) options available to your content type.

templatedisplaydropdown

 

Selecting options

Global options

Before Any text or HTML you put in the Before box will display before it displays the data you have selected from the Display dropdown menu.

After Any text or HTML you put in the After box will display after it displays the data you have selected from the Display dropdown menu.

templatebeforeafter

Display even if no data found forces this template block to display the before/after text even if it doesn't find anything to display.  This enables you to safely open an html tag such as a <div> in one template block and close it in another template block without risking breaking the page structure if no data is found.  It also provides an option to display a "message if no data was found".

templatedisplaynodata

Restrict Visibility allows you to display content only to users who are logged out, users who are logged in, or users who are logged in and have a certain WordPress user role.

templaterestrictvisibility

If you choose to restrict content, you can set an optional message to display for users that do not have permission to view the content.

templaterestrictvismessage

 

Custom options depending on field type

Taxonomy options

Order By lets you display the list of taxonomy terms by Default Order, Slug, Amount, or ID.

templatetaxorderby

 

Order allows you to specify the directional order of Ascending or Descending.

templatetaxorder

 

Separator is the optional character(s) inserted between the taxonomy terms.  You can use anything, including HTML tags in the separator, which makes this extremely powerful.

templatetaxseparator

You can combine the Before, After and Separator boxes to use HTML to put a list of taxonomy terms in an actual list format.

templatetaxonomylistexample

Display is a text box in which you can enter any text or HTML, plus the placeholders lists underneath the box.  These placeholders will all be replaced by their actual values when the template is displayed.

Connection blocks

Order By lets you display the list of connection items by Default Order, Slug, Amount, or ID.

Order allows you to specify the directional order of Ascending or Descending.

Separator is the optional character(s) inserted between the connection items.  You can use anything, including HTML tags in the separator, which makes this extremely powerful.

Template lists any other templates available for these connections.  By selecting one, you can make a template display within the template you're creating now.

For example, if you where creating a template for basic Posts, and you wanted to display a "Related Pages" section within this template, here you could choose a template for Pages that controls how those related pages are displayed within the overall Post template.

HTML blocks

HTML box

You can put any valid HTML code you'd like in this box.  Closing open HTML tags is not required in this box.  It will not make any assumptions for you, so make sure that you do remember to close them somewhere in your overall template.

tempatehtmlblock

Auto-add paragraphs

This option turns on shortcode processing and automatically wraps your text in HTML paragraph tags.

Using placeholders

The following placeholders can be used anywhere in your template: any HTML block, Before box, After box, or anywhere else that accepts HTML.

[url] will display the full permalink URL to the post currently being displayed.

Example: you want to add a "View details" link that opens in a new tab, so you add an HTML block containing the following:

<a href="[url]" target="_blank">View details</a>

[slug] will display the slug (the URL-friendly version of the title) of the post currently being displayed.

Example: you're creating a Product template, and want to add some custom CSS classes to a container <div> that wraps around the template.  Your HTML block for the opening <div> might look like this:

<div class="product product-[slug]">

[id] will display the unique numeric ID of the post currently being displayed.

Example: you're creating a template for basic Posts, and you want to link directly to the screen in the WordPress dashboard that edits this post.  You would create an HTML block that contains the following:

<a href="http://www.example.com/wp-admin/post.php?post=[id]&action=edit">Edit this post</a>