Skip Navigation

[Resolved] I’d like the CONTENT TEMPLATE to use the single-optician-profile.php

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

Problem:

Setup theme file for single custom type post.

Solution:

The Toolset content template works only in post content area, according to the your description, the single "optician-profile" post is rendered by theme file single-optician-profile.php, and render the post content with Toolset content template.

Relevant Documentation:

https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post

This support ticket is created 4 years, 6 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
- 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)

This topic contains 4 replies, has 2 voices.

Last updated by AlimB3245 4 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#1629923

Hi Luo Yang

Thanks for the prompt response and update..:-)..

The API for Google was all in place.. I double checked this.. But I think I got what I was doing wrong.. I was not using a content template.. but just putting the shortcode into the Post Body and expecting it to work.. it won't work like this.. right?

Anyways I have created the CONTENT TEMPLATE and now it's like this..

hidden link

The White Space on the right in desktop view (which would have shown a featured image if I add one) and the YE OPTICIAN above the slider are part of the theme's single.php... when I wanted some posts not to use this format I had created a single-optician-profile.php (another template for regular posts) which I was using before Toolset for optician profiles I created as regular posts... here's a link to how they appear.

hidden link

Now with the CONTENT TEMPLATE, it seems it is creating the template as something within single.php.. how do I edit this template to remove the features of single.php or maybe if possible, I'd like the CONTENT TEMPLATE to use the single-optician-profile.php (another template for regular) so that the featured-image and the other aspects are removed for the custom posts.

Please do advise. I am beginning to like Toolset..:-).. it's really amazing..:-)..

Regards,
Alim

#1629935

Hello,

The Toolset content template works only in post content area, according to the your description, the single "optician-profile" post is rendered by theme file single-optician-profile.php, and render the post content with Toolset content template.
See WP document:
https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
single-{post-type}.php – If the post type is product, WordPress would look for single-product.php.

For the question:
how do I edit this template to remove the features of single.php or maybe if possible
It depends on your theme file, since I don't have a copy of your theme files, I am not sure how to remove those features, I suggest you check it with your theme author.

#1630085

Hi Luo Yang

Thanks for that update.. It's really interesting..

So let me reconfirm... if I were to add another single-{post-type}.php in the themes child folder it would automatically use that file as a page-wrap.. is that right?

how do I edit this template to remove the features of single.php or maybe if possible
This one I am clear about so I can manage it.. thanks..

Will try the above and let you know if I managed it.. thanks again..

Just one quick question.. how to do find out what is the 'post-type' for my custom-post.. is it the 'slug' field in the name and description section?

Regards,
Alim

#1630139

Yes, you are right:

if I were to add another single-{post-type}.php in the themes child folder it would automatically use that file as a page-wrap

This is WordPress built-in feature, see the document I mentioned above.

And you are correct, that is post type slug:

the 'slug' field in the name and description section

#1630167

My issue is resolved now. Thank you!