Skip Navigation

[Resolved] How do I create a single page for my new CPT in Divi?

This support ticket is created 6 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 16 replies, has 2 voices.

Last updated by Christian Cox 6 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#578707

Tell us what you are trying to do?
Hi, I'm building a directory website will list coworking spaces (or desks). I have created a new CPT: Desk (pl. Desks). I now want to create the single-desk.php page ie the layout for Desk. But I want to use Divi.

Is there any documentation that you are following?
Yes. And this has caused my confusion. I want to do it as per this video (hidden link) (the part about not using Toolset layouts) but this only shows a loop being added, not a single page.

However, your documentation here (https://toolset.com/documentation/recommended-themes/toolset-divi-integration/) says (in the blue box) that this integration is only available in Beta. But I can see the fields are available in Divi in the latest stable/production release that I'm using.

What is the link to your site?
deskfinder.co.uk

So basically, I'm just trying to create a Divi layout for Desk (single) like the second half of the video. The bit I'm stuck with is where to tell Toolset which page to use for single-desk.php.

I hope all that makes sense!

Thanks in advance,
Dave

#578836
Screen Shot 2017-10-15 at 4.04.08 PM.png

Hi, with Layouts deactivated, if you go to Desks > Add New and begin creating a new desk, then click "Use the Divi Builder" as shown in the attached screenshot, you should be able to use the Divi Builder to design the single post page for your Desk. Is this what you had in mind? If not, please help me understand what else you would like to accomplish. Sorry for the confusion in our documentation, we're changing a few things around currently and trying to remove the old "integration" plugins you see referenced throughout the Layouts documentation.

#578851

Hi Christian, Thanks for getting back to me.

There is no such button on the "Add New Desk" page. You will see it on the Add Project page (as per the screenshot) because Project is a built-in Divi CPT.

I do know how to get the builder working in CPTs with some extra php, but I'm sure this wont solve the problem. I'd just be customising an individual Desk with the builder, when I really want to use the builder to create a global layout for Desk.

Does that make more sense? It's not the easiest thing to explain! 🙂

Dave

#578852

I think it might be best for me to take a look at how your site is set up to offer the best solution. If that's okay with you, please provide login credentials here for me to access wp-admin. I will enable private reply fields so you can share in confidence. A staging site would be preferable, but if that's not available the live site will be okay.

#578854

Okay I have added the following code to your child theme's functions.php file:

function my_et_builder_post_types( $post_types ) {
    $post_types[] = 'desk';
    //$post_types[] = 'another-slug';
     
    return $post_types;
}
add_filter( 'et_builder_post_types', 'my_et_builder_post_types' );

This will activate the Divi builder on the "desk" post type. If you want to add other custom post types, uncomment the next line and copy + paste it as many times as you need.

#578855

Brilliant. Thanks. But how do I make a single layout in Divi for every Desk? That's what the video was getting at. I dont want to edit each Desk page individually with Divi because my users will be creating their own Desk entries on the front end.

#579094

Starting around 1:40 in the video, Dario begins talking about how to use Divi and Toolset together. The process he's describing is for designing a single post - in this case, the Home Page. If you want, you could create a design once in Divi, then save it to your library and reuse the design in each post. However, there's not an integration between the Divi Builder and Content Templates or Template Layouts.

#579108

"there's not an integration between the Divi Builder and Content Templates or Template Layouts". Ah! I'd asked this question before purchase and was told Toolset did work with Divi. I assumed that would include single-desk.php.

That's useless for me because my customers will be adding content and will expect to see it formatted properly immediately.

Ok, so I still need all the functionality of Toolset so will remove Divi. New question: how would you recommend styling the whole site. I'm thinking of the starter theme with Microthemer. What do you think? Any recommendations?

#579178

New question: how would you recommend styling the whole site. I'm thinking of the starter theme with Microthemer. What do you think? Any recommendations?
I think Toolset Starter will give you more control over the design of the whole site including header and footer, but it might also take more time to get up and running just right because you'll be designing from a completely different starting point. Beginning with a theme that is closer to the design you want to end up with will probably take less time to get up and going, but then you may not have the granular level of control offered by the Starter Theme, since other themes are not "fully integrated." In themes that are not fully integrated, Layouts only controls the main content area of each post or page. The sidebar, header and footer are generally not controlled by Layouts there.

#579710

Thanks for that. I really appreciate your advice.

Would you be able to suggest a way to style the single custom posts and archives 'on the fly' like with a plugin like Microthemer (hidden link)? Is it possible to render, say, single-desk.php so I can style it graphically like that (rather than styling the individual published posts)?

Dave

#579713

I really don't have much experience with Microthemer, so I can't give you much advice there. I do know that other page builders like Visual Composer and Beaver Builder are more compatible with Content Templates, and give you much of the same drag and drop functionality of Divi. So I would definitely check out all three and see what kind of results you get.

#579722

Ah right! Using visual composer makes much more sense if you can build templates with it 😀 Thank you!

I'm just looking at https://toolset.com/documentation/user-guides/benefits-of-templates-for-custom-types-vc/

Would you mind clarifying a couple of final things for me? The article says "Whether your theme comes with Visual Composer or you have installed it manually, you will see a Visual Composer button in the editor. Click on it to edit the template with the page builder".

Does the same happen for archive layouts?

Does VC replace the Toolset Layouts plugin?

#579891

"you will see a Visual Composer button in the editor. Click on it to edit the template with the page builder"...Does the same happen for archive layouts?
That statement is referring to using Visual Composer within Content Templates. If you're talking about creating Content Templates for WordPress Archives, then yes, the Content Template editor for archives is basically the same as the Content Template editor for posts or CPTs. VC is tightly integrated here.

If you're talking about Toolset Layouts and creating a Layout for a WordPress Archive, it's not exactly the same. In the Layout editor, you will not be shown the Visual Composer interface to make any edits. If you want to use Visual Composer to design something with Layouts active, you would create a Content Template first, using Visual Composer. Then you would insert that Content Template into a Layout using a Content Template cell. So the integration between Layouts and Visual Composer isn't exactly like the integration between Content Templates and Visual Composer.

Does VC replace the Toolset Layouts plugin?
It can, to the extent that Layouts gives you the ability to make a drag and drop design that will be shown within the main content area of your existing site design. VC can do this too, but it doesn't have exactly the same types of modules you will find in Layouts. Some of the cells in Layouts are related to proprietary Views and Types functionality, and don't really translate into any VC modules. For example, there is no "View" module in VC, so you would have to use a Text module and place the View using a shortcode.

#579936

Christian, thanks for the detailed explanation. There are certainly a LOT of variables to consider and a lot of pros and cons to doing it each different way. The documentation doesn't make it easy to understand that Layouts is just one possible way of styling the site. And I now know that if you use Layouts, it has to be used on every page.

It seems that while Visual Composer will make a layout easier, I won't actually be able to style that layout on-the-fly. I can add shortcodes without the expense of VC. And I'd lose control over my headers and footers.

So here's where I'm at: My gut feeling is to use Toolset starter theme with the full toolset suite inc. Layouts (without the complication or expense of additional plugin integration like VC). That gives me full control of all content and headers.

But - how do I style the whole site without writing CSS by hand? That seems like a long and laborious job. How are other clients doing it. I really can't be the only person to ask that question?

Again, appreciate your time and advice on this.

#579998

I think that most clients aren't trying to implement a fully custom site design starting with the Toolset Starter theme. Some might use the Toolset Starter Theme for a while to get the feel of what they can do with Toolset, then realize, as you have, that they have a lot of CSS to write to style a full custom site exactly like they want it, or to expand beyond the basics provided there. So at that point, they begin looking for a reference site or a custom theme that is closer to the full design they had in mind. This means there is less CSS to write by hand, and they can use Visual Composer or Layouts or Beaver Builder or whatever to supplement that design as needed. There is a tradeoff of some ability to manage the design in wp-admin in exchange for less upfront investment in code.

I also think most clients are starting with a site theme that they're already fairly happy with, but they want to have the ability to style the content of posts or pages a bit, add custom post types, etc. This is where Toolset, Visual Composer, Layouts and Beaver Builder come into play.

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.