How Can We Help?

Create archive and single page templates for custom post type

You are here:

To create archive page you need first to prepare an archive post template which will be used as post layout in the archive listing. 

Create archive post template

Go to WP admin -> Templates -> Add New and select “Archive Post” as type of template. You can optionally set a name of your template.


In our example we have used Advanced Flip Box widget with Dynamic tags extension, which is available in our PRO version. In order to display post featured image, post title or any other post field you need to use Dynamic Tags. You can use whatever widget you want with Dynamic Tags to display particular post fields. See the preview below.

After you have set the design of your archive post layout you are ready to create the archive page.

Create archive template

In order to create an archive page first you need to create archive template. To do this go to WP admin -> Templates -> Add New and select “Archive” as type of template. You can optionally set a name of your template for better identification. 


In your template you need to use Archive Posts widget to display a list of posts. In the widget settings go to Content tab -> Test Post Type and select the post type you want to use for preview of the widget. In our case we are using custom post type “Projects”.


Go to Layout section of the widget settings and select the Archive post template you have created earlier. You can play with the other settings to make it looks the way you want.

Save your template and you are ready for the next step – create single post template which will be used as a single page of your custom post type.

Create single post template

Go to WP admin -> Templates -> Add New and select “Single Post” as a template type.

Place the widgets you need for the single page template and we are almost done!

Assign custom post templates

Here is the last step! We already have Archive template, Archive post template (used in Archive template) and Single post template. We just need to assign them in the customizer settings. 

Go to WP admin -> Appearance -> Customize. Find your custom post type and click on it, in our case we are using “Project”. You will see options for Listing and Single. Click on Listing and select your archive template. Do the same for Single – select your single post template which you have created. If you are using PRO version you can select different header and footer templates for your custom post type. 

That’s it! Now you have all set with your custom post type. 

Related Articles​

Previous Attach custom header and footer for custom post type
Next Create custom post type

Leave a Reply

Your email address will not be published.

Table of Contents