Skip Navigation

[Resolved] Template not working on custom post types

This support ticket is created 5 years, 8 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.

Our next available supporter will start replying to tickets in about 7.69 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 8 replies, has 2 voices.

Last updated by Minesh 5 years, 8 months ago.

Assisted by: Minesh.

Author
Posts
#1219887

I've created a custom post type and its related taxonomies and created a template for this post type but when I'm adding a new post on this custom post type, template not showing in the frontend after publishing.

#1220138

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - can you please share problem URL and access details so I can review your current setup and check why the content template is not assigned to your post type.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1220148

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - can you please mention for which post type you created a new template?

#1220149

Here are the steps I followed:
1. Created a custom post type "Pills" using toolset.
2. Created its taxonomies and assigned them to the custom post types "Pill".
3. Created custom fields and assigned to custom post types.
4. Created a template using layout and assigned it to the custom post types from toolset dashboard.

So when I create a new post in custom post type and fill all custom fields and publish it and view the post, the front page is showing no content.

#1220151

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - I checked on your install and I see that you are using Newspaper theme.

When I switch to default theme 2019 - I can see the layout you created is applied successfully and works as expected.

This looks like your theme is not compatible with Toolset Layouts, you need to either switch to the recomonded themes that is already compatible with Layouts:
=> https://toolset.com/documentation/recommended-themes/
Or
You need to make your theme Layouts compatible by adjusting your theme template source code:
=> https://toolset.com/documentation/user-guides/develop-layouts-based-themes/

#1220156

Hi,

Can you help me what exact code I need to change to make Newspaper compatible with Toolset Layouts?

#1220157

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - that is why I shared the following Doc:
=> https://toolset.com/documentation/user-guides/develop-layouts-based-themes/#php-integration-for-layouts

You need to use the following function for Layouts render:

the_ddlayout();

You should create a child theme and create single PHP template for your targeted post type and use the above function at whatever place you want to display the layout.

#1220933

Hi,

I talked to support staff of the theme. They are talking that they do not support untested plugins.

Now the main problem is that I'm not good with changing the codes. Is there any proper documentation or any other help you can provide. That's why I choose the Toolset Plugin.

Can you help me changing the codes?

#1221519

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - that is why I shared the following Doc that may help you:
=> https://toolset.com/documentation/user-guides/develop-layouts-based-themes/#php-integration-for-layouts

As you can see our support policy:
=> https://toolset.com/toolset-support-policy/

I can show you the way and guide you accordingly and share the related Docs where I already shared the workaround that:

You should create a child theme and create single PHP template for your targeted post type and use the above function at whatever place you want to display the layout.

But if you are not familiar with coding, I can not do much here. Maybe you should contact our certified partners for your theme customization:
=> https://toolset.com/contractors/