Skip Navigation

[Resolved] Use a page as a template to display the single post view for a custom post type

This support ticket is created 6 years 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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 -
- - - - - - -

Supporter timezone: Pacific/Niue (GMT-11:00)

This topic contains 1 reply, has 2 voices.

Last updated by Yvette Oliveau 6 years ago.

Assisted by: Yvette Oliveau.

Author
Posts
#1205203

Tell us what you are trying to do?
My theme is very particular – if a page doesn't have a Revolution Slider assigned, the template doesn't work correctly. I need to use a predefined page as a template for displaying the single item view of a custom post type I defined.

Is there any documentation that you are following?
No, I haven't found any to address this.

Is there a similar example that we can see?
Existing single item view for "Job' post type: hidden link
Template Page I'd like to use: hidden link

What is the link to your site?
hidden link

#1205408

Yvette Oliveau
Supporter

Languages: English (English ) Spanish (Español ) French (Français )

Timezone: Pacific/Niue (GMT-11:00)

AssignContentTEmplateToType.png
NeedAccessKey.png

Hello

I was unable to view the links you included in your message since it requires a site access key to view the pages.
I am opening the private area for you to provide this in your next reply.

Normally, you can assign any Toolset content template to be the default template used when displaying a single custom post type (e.g. job) either by :
- changing its "usage" within the template definition or
https://toolset.com/documentation/user-guides/setting-view-templates-for-single-pages/
- by assigning it to the particular post (see image)
https://toolset.com/documentation/getting-started-with-toolset/create-templates-to-display-custom-posts/designing-a-template-without-any-page-builder/

However, if you have a particular page already created that needs to be the template for all of your post types, then this might be a question that is better made to your theme support since, I am assuming that your page was created not using Toolset.

Please note, you can not create a whole page template with a Content Template. Your theme has to deliver the header, body and footer.

You can also integrate your existing Toolset content templates into your theme´s template files using Toolset PHP API, in this way you can respect the existing theme requirements but also take advantage of the work you have done with Toolset.
Here are some links of interest to achieve this:

https://toolset.com/documentation/programmer-reference/views-api/ (to display existing views within theme template files)
https://toolset.com/documentation/user-guides/layouts-theme-integration/ (if you are using layouts)
https://toolset.com/documentation/customizing-sites-using-php/creating-templates-single-custom-posts/#creating-template-parts-with-your-custom-fields-and-design (to access Types fields within your theme PHP template files )

I hope this information helps you clarify your options.