Skip Navigation

[Résolu] Using non-types fields in a view template

This support ticket is created Il y a 7 années et 5 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

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

Last updated by timB Il y a 7 années et 5 mois.

Assisted by: Shane.

Auteur
Publications
#457753

I have created a View Template for a custom post type which came with another plugin. I am bound to using this CPT because of a third-party feed it generates.

The CPT has a range of custom fields and all of them start with the "_" (underscore) prefix, so they aren't visible to edit nor to bring into views using the GUI.

Can you give me the shortcode to use (if there is one) for populating a view template with fields named "_wpgh_this_field" for example...?

Thank you
Tim

#457793

Shane
Supporter

Languages: Anglais (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Tim,

Thank you for contacting our support forum.

What you can do is try doing is using the wpv-post-field shortcode.
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-field

This should allow you to display those non-types custom fields.

Thanks,
Shane

#457797

Thanks so much Shane. I greatly appreciate your quick response.

Your answer works is good, I'm sure, for one-off fields, but I have quite a few to deal with. Since sending my earlier request a Google search sent me to this page:
https://toolset.com/documentation/user-guides/displaying-wordpress-custom-fields/using-third-party-hidden-fields/

Which was precisely what I needed, and hadn't realised was possible in Toolset Settings. So I can now add these third party fields to Views and View Templates just as easily as if they'd been created in Types... what a revelation!

My problem is fixed and I'm a happy punter again.

Best wishes
Tim

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