Skip Navigation

[Resolved] Custom post template not rendering at all

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

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 5 replies, has 2 voices.

Last updated by eveD 5 years, 5 months ago.

Assisted by: Christian Cox.

Author
Posts
#1271553

I am trying to:
Create a custom post template for my CPT "Ideas"

Link to a page where the issue can be seen: hidden link

I expected to see:
The custom layout that I designed using Layouts, and that I assigned to the CPT "Ideas".

Instead, I got:
The regular single.php design

I designed a custom template for my custom posts "Ideas". In the toolset dashboard, this is set as the template, and also on the individual posts (In the dashboard sidebar it says that "Template for ideas" is the assigned template.

But the template is not rendering. The single.php post is being called instead.

#1271917

Hi, is the problem solved by switching to a standard default theme like Twenty Nineteen? Unfortunately our team has determined that it isn't possible to integrate Toolset with the Newspaper theme. They use a non-standard template hierarchy that makes it difficult to hook into.

#1272503

It does work with a different theme.

Unfortunately it is too late for me to change themes now. The best workaround I can think of is to use a custom view to render the custom post type. It will require some tweaking of the links, but I think it is do-abale.

Can you think of another way to render custom layout for a CPT? Or of issues that might arise if i use the Views solutions?

Thanks!

#1272551

I think I am sorted with the above, except for one BIG problem: I need to display the comments for the postID that is passed through the URL, not the current page (which is acting as a template, so would show all comments for every view it had ever displayed).

So I need to filter the comments by the URL postID. Is there an easy way to do that or would it require extensive custom work?

thanks,

#1272587

Ok...so I have searched the forum and found this response from you on how to make Newspaper theme work together with Toolset:
https://toolset.com/forums/topic/layout-pd/

I have followed the instructions, and updated my "Theme support for Content Templates" with "td_module_single_base::get_content" but there is no change.

Any idea why this did not fix the problem?

#1272621

My issue is resolved now. Thank you!
( I am using Content Templates for my CPT, and assigned the correct one in the dashboard sidebar. I still cannot change the look of the title and meta, but will work on it...)