Skip Navigation

[Resolved] Show field name not just value

This support ticket is created 2 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.

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 – 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/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Waqar 2 years, 9 months ago.

Assisted by: Waqar.

Author
Posts
#2107969

Tell us what you are trying to do?
I would like to have the field name and value showing I have added the php code <?php echo(types_render_field( 'franchise_initial ', array( 'arg1' => 'val1', 'arg2' => 'val2' ) )); ?> to single.php the value shows but not the field.

Is there any documentation that you are following?
<?php echo(types_render_field( 'franchise_initial ', array( 'arg1' => 'val1', 'arg2' => 'val2' ) )); ?>
Is there a similar example that we can see?

What is the link to your site?
hidden link

#2108145

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 show the field's name with the value, you can set the "show_name" attribute to "true":
https://toolset.com/documentation/customizing-sites-using-php/functions/

For example:


<?php echo(types_render_field( 'franchise_initial ', array( 'show_name' => true ) )); ?>

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

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