Skip Navigation

[Resolved] types_render_field and WP featured image

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 11 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 -
- - - - - - -

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

This topic contains 2 replies, has 2 voices.

Last updated by Kristoffer 11 years, 4 months ago.

Assisted by: Caridad.

Author
Posts
#31653

If I want to display the data, I write:

<?php echo $ color = types_render_field ("client-color ', array (' raw '=>' true '));?></ code>

I think this also should work to get the "featured image" link.
[php]<?php echo $ color = types_render_field ("wpv-mail-featured-image ', array (' raw '=>' true '));?>

I know how I can get the desired results with this code:

<?php echo do_shortcode ('[wpv-mail-featured-image'] ');?>

Can anyone help me here?

Thank you for an awesome powerful tool!

#31661

Dear Kristoffer,

Im not sure where you got the shortcode from, the real name is wpv-post-featured-image. Use it like this:

<?php echo do_shortcode ('[wpv-post-featured-image'] ');?>

The types_render_field function wont work for standard post fields, only custom field. The corresponding WordPress function is the_post_thumbnail():

http://codex.wordpress.org/Function_Reference/the_post_thumbnail

Please let me know if there is anything else that I can assist you with.

Regards,
Caridad

#31663

Hi CaridadZ,

my fault. I meant "post" of course. You answered my question!

Thank you,
Kristoffer

The forum ‘Types Community Support’ is closed to new topics and replies.

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