Sauter la navigation

[Résolu] Display shortcodes from 3rd parties in View

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

Problem:
How to output 3rd-party custom fields not created with Types?

Solution:
In your templates or the output of a post View use the wpv-post-field shortcode to show the field, which will output the raw database value.

Relevant Documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-field

This support ticket is created Il y a 6 années. 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
- 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+00:00)

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par duongN-3 Il y a 6 années.

Assisté par: Nigel.

Auteur
Publications
#1188006

Tell us what you are trying to do?
Display data from custom field (not created by Toolset) using a 3rd party shortcode using a custom post type (Downloads--not created by Toolset) that's associated to another custom post type (created by Toolset).

My shortcode is registered using php and not done manually in the Toolset settings because Toolset doesn't accept uppercase letters.
My shortcode looks like this: acf_FansubSection_episodestatus

The PHP for the shortcode looks like this: php echo wpdm_acf([ID],'FansubSection/episodestatus');

Is there any documentation that you are following?
N/A

#1188106

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+00:00)

You are trying to output a field value from a non-Toolset post type which is linked in a post relationship to a Toolset post type in a View.

What is the View displaying? The post type registered with Toolset?

If the custom field is a simple field (i.e. stores text in wp_postmeta), then you might not need any 3rd-party shortcodes.

In the output of the View use the Fields and Views button and choose post field (to output a custom field value), and in the resulting dialog choose the Post selection tab to specify that the value should come from the related post.

If that doesn't fit with what you are aiming to do, please give more details about what you want to output where.

#1192296

My issue is resolved now. Thank you!