Create Custom Single Post Template in Divi theme

Spread the love
  • 3

In one of our previous guides, we have explained how to create a custom post archive for Divi theme. In this guide, we are going to show you how to create a custom single post template for Divi theme.

What is the Custom Single Post Template?

It’s the file that WordPress will use to display your custom post type single post, in our example, we’re using catalog as our custom post type. So, when you visit one of your catalogs, WordPress will display that catalog using the file you set as a single post template.

Create Custom Single Post Template in Divi:

Divi theme is using single.php file to display ALL post types on your website, so if you create, for example, catalog post type, Divi will display it using single.php file. To create your own single post template for your custom post type:

1- Locate the single.php file in your Divi theme.

2- Move it to your Divi Child theme (Why? How? Check this post Create a child theme in 2 minutes or download this FREE child theme crafted especially for Divi)

3- Rename that copy to single-{posttype_slugname}.php, in our example it would be single-catalog.php where catalog is our custom post type slug.

4- Start editing your newly created file, Divi will use this file to display your catalog (custom post) single post.

(Visited 3,354 times, 1 visits today)
  • 3

Mohamed Khafaja

WordPress enthusiast, who loves to share the knowledge!

accumsan velit, eleifend fringilla eget sit dolor. Aenean

Pin It on Pinterest

Do you find this interesting?

Share it with your friends!