How to Create Templates for Custom Post Types?

Single post template

Ok, now you might wish to create some global content template for all single boat pages:

1. Go to “TheGem -> Templates Builder -> Single Post/Page”, click on “Add new” and specify the name of your template in the popup (let’s say “Single Boat Template”).

2. Now you can create your content template as described in the chapter “Single Post Builder” .

While creating your single boat content template you can add dynamic content from custom fields (added previously) by using “Custom Fields” content element or Dynamic Tags option (see the detailed description here).

3. After saving your template, go to Theme Options -> Single Pages -> Boats.

4. Under “Layout Source” select “Templates Builder” and select “Single Boat”

5. Now click on “Save” in Theme Options.

That’s all. Now all your single boat pages will have the same unified content layout as created in the “Single Boat” template.


Archives template

In the same way you can create a content template for the boats archive pages. Boats archive page is for example a page of the “Boat Types” taxonomy term – it displays the loop of all boats assigned to the certain boat type. For example: “Motorboats” is the page displaying the list of all boats assigned to the “Motorboats” type:

1. Go to “TheGem -> Templates Builder -> Archives”, click on “Add new” and specify the name of your template in the popup (let’s say “Boat Type Template”).

2. Now you can create your content template as described in the chapter “Archives Builder” 

3. After saving your template, go to Theme Options -> Archive Pages -> Boats Archive.

4. Under “Layout Source” select “Templates Builder” and select “Boat Types”

That’s all. Now all your boat archive pages will have the same unified content layout as created in the “Boat Types” template.