Skip Navigation

[Resolved] Creating multiple layouts to posts or custodia posts

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to create several designs and choose one for each post or page.

Solution: Create multiple Content Templates and choose a template for each post or page. You can optionally choose a single template as the default setting for an entire post type.

Relevant Documentation: https://toolset.com/course-lesson/creating-templates-to-display-custom-posts/

This support ticket is created 3 years, 10 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 4 replies, has 2 voices.

Last updated by Franco Calcagni 3 years, 10 months ago.

Assisted by: Christian Cox.

Author
Posts
#1899583

We need to create multiple layouts to be selectable and applied when creating a post or a custom post. I mean, if I create a post I need to apply to that post the layout A or B (same for the custom post)
Is it possible to achieve that with Toolset?

Thanks

Franco

#1900241

Hello, yes of course this is possible in Toolset. The Content Template assigned to each post can be configured in the post editor screen, per post. You can create as many Content Templates as you would like, and apply the desired template to a post by selecting the desired Content Template in the post editor screen. You can also set a Content Template as the default template for an entire post type, and optionally apply it to all existing posts in that post type. This is helpful if you already have many posts created and you want to apply a Content Template to all those posts retroactively.

For example, let us say you have 4 Content Templates - Template A, Template B, Template C, and Template D. You also have a large number of custom posts with no Content Template applied yet. Let us say you want to apply Template A to most of the posts in your custom post type, but you want to apply Template B, Template C, or Template D to a few of the posts instead of Template A. You would first edit Template A and set it to be applied to all posts in the custom post type, optionally including all existing posts. This would apply Template A to all the posts in the custom post type. Also any new posts you create will automatically have Template A applied, by default. While creating a new post or editing an existing post, you can manually choose a different template in the Content Template panel to override the default setting for Template A.

I hope this is clear. Let me know if you have additional questions about applying Content Templates in the post editor screen in wp-admin.

#1900243

Hi Christian,
is it possible to assign different content templates also to archive pages and pages?
Is there a tutorial to create content templates? I know that Toolset Layouts are not available anymore, what is now the best way to create content templates?

Thanks

Franco

#1900267

Yes, the process for assigning different Content Templates to each Page is the same as I described before for assigning different templates to posts. Just choose the desired Content Template in the page editor screen. WordPress Archives are assigned per post type or per taxonomy when you create the archive itself. Typically you will create a separate WordPress Archive for each custom post type. If you want to apply a different archive design programmatically, like different WP Archives per term in a taxonomy archive, for example, that requires custom code using our Views API filter wpv_filter_force_wordpress_archive:
https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_force_wordpress_archive

I know that Toolset Layouts are not available anymore, what is now the best way to create content templates?
We recommend you use the Block Editor to create templates if you want a drag-and-drop editing experience. You can enable the Blocks Editor experience in the classic Views plugin by going to Toolset > Settings > General tab, under the Editing experience options.

Is there a tutorial to create content templates?
Yes, we have a guide available here: https://toolset.com/course-lesson/creating-templates-to-display-custom-posts/

#1900269

My issue is resolved now. Thank you to Christian, very helpful and always professional!