Skip Navigation

[Resolved] Single Item View = Cannot change template from default

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

Problem:
Assigned content template to single post is not rendering when you display the single post

Solution:
Content Templates modify the content when called from the WordPress’ built-in the_content function. Some themes do not use the_content function, but define their own function. In this case, Content Templates are not applied to selected posts on the front-end.

To solve this, you can enter the name of the function your theme uses on the Toolset->Settings page, under the Front-end Content tab. You can find the appropriate field in Theme support for Content Templates section.

You can find proposed solution, in this case, with the following reply:
=> https://toolset.com/forums/topic/single-item-view-cannot-change-template-from-default/#post-743505

Relevant Documentation:
https://toolset.com/documentation/user-guides/editing-view-templates/theme-support-for-content-templates/

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

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

Last updated by michaelH-21 6 years, 8 months ago.

Assisted by: Minesh.

Author
Posts
#739222
Screen Shot 2018-04-25 at 11.21.02 PM.png
Screen Shot 2018-04-25 at 11.20.54 PM.png

Currently learning Toolset and created my first project using a "Houses for Rent" scenario. I have got my custom post type setup with a group of fields and taxonomy. I created a Content Template then was able to create a View and put it on the website with search options and it shows and searches correctly. I'm not wanting the option to be able to click on one of the search results and it take me to the Single View of that item (i.e. my website.com/post-type-name/item-name) . When I navigate to that Single View, I have tried changing every setting I can think of, but I can't adjust the styling on this page. It just shows up like the attached screenshot. It doesn't show any of the custom fields, only the Post Title and Body. I tried creating another content template, another view, another layout, and linking them to the new Custom Post Type, but can't get it to update. What am I missing?

Unfortunately I'm running this on MAMP on a localhost as I learn, so can't send a link to login.

#740887

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

As I understand - you want to display single post and assign it content template to single post which will hold the custom fields taxonomies etc..etc.. - correct? If yes:

Here is the details Doc how you can create and assign content template to display single post:
=> https://toolset.com/documentation/user-guides/editing-view-templates/setting-view-templates-for-single-page

#742345
Edit Content Template ‹ Elite Testing — WordPress.jpg
Screen Shot 2018-04-26 at 8.16.12 AM.png

Thank you but I seem to have already followed those steps (which for record purposes, the link is missing the 's' at the very end for it to work properly).

If you see the attached screenshot you can see my two Content Templates. One being used in the View that has the search capabilities, then the other named House for Rent. House for Rent is already applied to both Single page and Post Type archive (not knowing what either do, so tried assigning it to both).

It still doesn't work when I go to website.com/post-type-name/item-name . It only shows Post Title and Body, like the original screenshot submitted.

If this is not enough information to find the issue/step I'm missing, I can submit a video showing whatever you'd like, or could do a screen share session if easier.

Thanks

#742357

Minesh
Supporter

Languages: English (English )

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

Ok - I see you are using WPBakery page builder.

Here is the correct Doc how you can create content templates using WP Backery page builder:
=> https://toolset.com/documentation/user-guides/using-toolset-with-wpbakery-page-builder/create-templates-for-custom-post-types/

If you still have issues - please send me duplicator package of your site so that I will debug this issue further.
=> https://toolset.com/faq/provide-supporters-copy-site/

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

#743505

Minesh
Supporter

Languages: English (English )

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

Well- the issue is the theme you are using is not using the standard the_content() function to display the content.

I debug this issue further and I activated the debug for theme support and I found that "ishyoboy_the_content" function is used to display the content.

Please register the function ishyoboy_the_content at:
=> Toolset => Settings => Front-end Content tab => Theme support for Content Templates section

More info:
=> https://toolset.com/documentation/user-guides/editing-view-templates/theme-support-for-content-templates/

Once you register the above said function I am able to see the content is rendered properly.

#743753

that worked! thanks! Thought I was going crazy 🙂 . So I set things up correctly, just the Boldial theme was causing issues with ONLY the Toolset Single Page template (not any other pages).

Thank you for your assistance

#743754

thank you!