Skip Navigation

[Resolved] Custom fields not showing in Content Template

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

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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 5 replies, has 3 voices.

Last updated by Nigel 4 years, 4 months ago.

Assisted by: Nigel.

Author
Posts
#1428727
report-not-working.png
report-content-template.png

I am trying to:
We've created custom fields for our "Report" Custom posts and I have created a Report Content template that should pull in the custom fields but the fields are not showing.

Link to a page where the issue can be seen: hidden link

I expected to see: The custom fields

Instead, I got: Nothing

#1431485

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

To troubleshoot this, I'll need to see how these fields and the content template are set up in the admin area.

Can you please share temporary admin login details in reply to this message?

Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.

regards,
Waqar

#1437867

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for sharing the admin access, but it is not allowing me to log in.

I'm getting the message:

"Important notice: the first time you log in to our new website, you will need to reset your password.
ERROR: The password you entered for the email address <email> is incorrect. Lost your password?"

Can you please check the username and the password and share them again?

Note: your next reply will be private.

regards,
Waqar

#1442629

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Screenshot 2020-01-06 at 13.54.07.png

Hi there

Waqar has a day off today, so let me help.

I visited your site and I see in your templates that you are using a WPBakery module to output the custom fields, and you are specifying the text name of the custom field as the source (screenshot).

Types custom fields use a wpcf- prefix when stored in wp_postmeta, and it is this key which you likely need to use for WPBakery to know what the correct source is. Try changing the "name" to the post meta key, e.g. 'wpcf-report-no' for the Report No field.

#1443313

Thank you - that's great. It's worked for all fields expect the date field "Publication Date" - which is diplaying incorrectly. It's showing a numbers rather that the expected date format. How do I correct this? Thanks

#1444003

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

The problem is that WPBakery is taking the raw values from the database for custom fields, which for simple text-based fields is not a problem, but which is for more complex fields.

Date fields are stored as UNIX timestamps (the number of seconds since 1 Jan 1970) and that is why you are seeing numbers output.

When you output such fields using types shortcodes then you can choose the preferred formatting.

So, instead of WPBakery's dynamic sources, use a text module to add the types shortcode. You should have the Fields and Views button available to insert the shortcode with the relevant attributes.

If something has changed with the recent WPBakery updates and that button is missing, let me know.

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