Skip Navigation

[Résolu] I still see the featured Image on my posts, even if not included in the Content Template

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:
I created a Content Template for my Posts but I still see the Post Title, Featured Image and Post Date, even if I did not add this to my Content Template.
I can see the content added to the Content Template, but also the above mentioned content.

Solution:
Title, Date, Featured Images and such are not part of the WordPress function to render the Content of a Post (Post Body)

the_content()

.

The theme you use, uses

the_content()

, but also functions to render Title, Date etc.

Content Templates will replace ONLY

the_content()

part.

To style the ENTIRE template you can use Layouts, which has to be integrated and will then replace the Loop of your Theme.

OR, you can create a Custom Template with PHP for your Theme (at best, use a Child theme) and in there do NOT call title, featured Image, and similar.

You could also use our Starter Theme that is ready for Content Templates to take over all your display

Relevant Documentation:
https://toolset.com/documentation/user-guides/layouts-theme-integration/
https://toolset.com/documentation/user-guides/view-templates/
https://toolset.com/documentation/user-guides/theme-support-for-content-templates/
https://developer.wordpress.org/reference/functions/the_content
https://codex.wordpress.org/Function_Reference/the_title
https://developer.wordpress.org/reference/functions/the_post_thumbnail/
https://toolset.com/documentation/user-guides/toolset-starter-theme/

This support ticket is created Il y a 7 années et 11 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 3 réponses, has 2 voix.

Last updated by chrisR-14 Il y a 7 années et 10 mois.

Assisted by: Beda.

Auteur
Publications
#400319

I am trying to: Edit a part of the post that is not controlled by the content template.

I visited this URL: <removed by admin>

I expected to see: I only expected to see the content from the template content

Instead, I got: I see the featured image and date submitted, as well as the post title. I can't figure out where I edit that content.

#400569

That's your theme.

Title, Date, Featured Images and such are not part of the WordPress function to render the Content of a Post (Post Body) the_content().

So, if the theme uses the_content(), but obviously also other functions to render Title, Date and such, it will still Display those contents even if you don't pass them in your Content Templates.

Content Templates will replace ONLY the_content() part.

To style the ENTIRE template you can use Layouts, which has to be integrated and will then replace the Loop of your Theme:
https://toolset.com/documentation/user-guides/layouts-theme-integration/

OR, you can create a Custom Template with PHP for your Theme (at best, use a Child theme) and in there do NOT call title, featured Image, and similar.

More about this you can learn here:
https://toolset.com/documentation/user-guides/view-templates/
https://toolset.com/documentation/user-guides/theme-support-for-content-templates/
https://developer.wordpress.org/reference/functions/the_content/
https://codex.wordpress.org/Function_Reference/the_title
https://developer.wordpress.org/reference/functions/the_post_thumbnail/

You could also use our Starter Theme that is ready for Content Templates to take over all your display:
https://toolset.com/documentation/user-guides/toolset-starter-theme/

#401729

I'm using the Customizr theme and have Layouts integrated. I'm playing with Layouts now but am having a trouble grasping how I should be using them in relation to Views and Content Templates. I created a new thread to discuss that. I'll close this thread.

#401730

Any chance I can get the link removed from the original post? Don't want people seeing the dev site.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.