Skip Navigation

[Gelöst] The content template doesn’t work for a post type

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem:

Create a content template for single post of a custom post type.

But when click to view one of custom post types, I can't see any custom Toolset fields, only standard WP post fields like a featured image.

Solution:

Please check these:

1) Make sure you are using the latest version of Tooslet plugins, you can download them here:

https://toolset.com/account/downloads/

2) Follow our document to setup the content template, and assign it to the single post:

https://toolset.com/documentation/user-guides/setting-view-templates-for-single-pages/

3) Some themes don't use wodpress function the_content() to render the content, you can follow our document to add your theme Support for Content Templates:

https://toolset.com/documentation/user-guides/theme-support-for-content-templates/

Relevant Documentation:

https://toolset.com/documentation/user-guides/setting-view-templates-for-single-pages/

This support ticket is created vor 6 Jahren, 2 Monaten. 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Dieses Thema enthält 3 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Luo Yang vor 6 Jahren, 2 Monaten.

Assistiert von: Luo Yang.

Author
Artikel
#1112468

<> I am trying to:
Create a content template for a custom post type as I usually did

<> Link to a page where the issue can be seen:
versteckter Link
versteckter Link

<> I expected to see:
I want to see that all custom fields are displayed when I view a custom post type thru a custom template.

<> Instead, I got:
I created custom fields and connected to the custom post type and created a content template for this custom post type.
But when click to view one of custom post types, I can't see any custom Toolset fields, only standard WP post fields like a featured image.
At the same time, two other previous content templates for other post types works well without problems.
Another weird thing that, when I create a view with a custom post type I can see all custom fields, but I can't see them in a custom template (?).

#1112773

Hello,

Please check these:
1) Make sure you are using the latest version of Tooslet plugins, you can download them here:
https://toolset.com/account/downloads/

2) Follow our document to setup the content template, and assign it to the single post:
https://toolset.com/documentation/user-guides/setting-view-templates-for-single-pages/

3) Some themes don't use wodpress function the_content() to render the content, you can follow our document to add your theme Support for Content Templates:
https://toolset.com/documentation/user-guides/theme-support-for-content-templates/

#1113055

My issue is resolved now. Thank you, Luo!
In my case, this article helped: https://toolset.com/documentation/user-guides/setting-view-templates-for-single-pages/
The issue was resolved when I added content template not only to the custom post archive but also for a single page.

#1114575

You are welcome