Skip Navigation

[Resolved] Display a custom field in template Single Post, Category and Author

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

Problem:

Content template does not work in Newspaper theme.

Solution:

You can follow our document to locate the function name, and fill the function name in Views setting page.:

https://toolset.com/forums/topic/display-a-custom-field-in-template-single-post-category-and-author/#post-1220169

Relevant Documentation:

https://toolset.com/documentation/user-guides/theme-support-for-content-templates/

This support ticket is created 5 years, 9 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 2 replies, has 2 voices.

Last updated by alessioC 5 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#1219949

Dear Toolset Support,

I would like to display a custom field on the single post, category and author template
but I couldn't do it.

The custom field is called "testo".

I tried to add the field, but it doesn't appear.

To access WordPress:

Add this to your host file:

34.240.153.106 loccidentale.it hidden link (without hidden link)

Could you do a check?

Thank you

#1220169

Hello,

Thanks for the details, I can login into your website and see the problem.

Your website is using a custom function to render the post content in single post, so Views content template does not work as expected.

You can follow our document to locate the function name, and fill the function name in Views setting page.

For example, you can try these:
1) Dashboard-> Toolset-> Settings-> Front-end Content
in section "Theme support for Content Templates", enable option "Enable theme support debugging"

2) Test the single post in front-end, for example this post:
hidden link
You should be able to see below message:
Le funzioni valide registrate sono td_module_single_base::get_content

The custom function name is: td_module_single_base::get_content

3) Dashboard-> Toolset-> Settings-> Front-end Content
in section "Theme support for Content Templates", add above function name: td_module_single_base::get_content, and test it again, it works fine.

More help:
https://toolset.com/documentation/user-guides/theme-support-for-content-templates/

#1220458

My issue is resolved now. Thank you!