Skip Navigation

[Resolved] The element is not displayed according to the content template

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

Problem:
With my theme Custom templates have no effect (it still outputs what the Theme would)

Solution:
Your theme is not using the_content() to display Post content

You can find out if it does, and if not, what function it uses instead, by using the Content Template Debug Tool in Toolset > Settings > Front End Content > Theme support for Content Templates.

Enable theme support debugging and visit any Post on your Website.

There should then appear a Message, like the below:

Content template debug: Calling functions are ....

The Function that will display on place of the 3 dots above (...) is the function used by the Theme to display the Content.

You will then enter and save this function to Toolset > Settings > Front End Content > Theme support for Content Templates.

Relevant Documentation:
https://toolset.com/documentation/user-guides/setting-view-templates-for-single-pages/ > Theme support for Content Templates

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

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

Last updated by sorinR 8 years ago.

Assisted by: Beda.

Author
Posts
#392065

I am trying to: display a custom type element using a content template.

I visited this URL: hidden link

I expected to see: the content displayed as i defined it in the content template

Instead, I got: just a thumbnaila and the post title.

#392114

Can you show me the code of the Content template?

If the Content Template is assigned to your Post or page that you want to display with it, and you call all (existing) Data with the ShortCodes in it, it should also display.

What I suspect, is that either the content template is not assigned to your Post, or your Theme is not using the_content to display the Posts Contents.

You can find out if it does, and if not, what function it uses instead, by using the Content Template Debug Tool in Toolset > Settings > Front End Content > Theme support for Content Templates.

Enable theme support debugging and visit any Post on your Website.

There should then appear a Message, like the below:

Content template debug: Calling functions are ....

The Function that will display on place of the 3 dots above (...) is the function used by the Theme to display the Content.

You will then enter and save this function to Toolset > Settings > Front End Content > Theme support for Content Templates.

It's elaborated here:
https://toolset.com/documentation/user-guides/setting-view-templates-for-single-pages/ > Theme support for Content Templates

Thank you

#392132

so i did what you said and the calling function are:

zn_setup_post_data, apply_filters, call_user_func_array

i placed ONLY the first one and now the content is displayed properly

Is it ok to put only the first one?

#392421

Yes, this is OK.

It's the Theme's content render function.

The rest is:

apply_filters as explained here:
https://developer.wordpress.org/reference/functions/apply_filters/
http://stackoverflow.com/questions/2270989/what-does-apply-filters-actually-do-in-wordpress

call_user_func_array as explained here:
hidden link

You inserted the correct function

Let me know if you need further assistance with this.

#392424

thank you.

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