Skip Navigation

[Resolved] Name of Types field does not show

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

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/Hong_Kong (GMT+08:00)

This topic contains 9 replies, has 2 voices.

Last updated by Laszlo 6 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#921427
2018-07-05_21h38_44v2.png
2018-07-05_21h42_38.png

I am trying to show the name of the field, followed by the content of the field.

Therefore i use it´s slug "praxisbeispiele:
<?php echo (types_render_field ('praxisbeispiele', array ('show_name' => 'true','output' => 'html'))); ?>

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

I expected to see:

Aus unserer Praxis

Beratung und Vertretung der österreichischen Tochtergesellschaft einer osteuropäischen Großbank in allen a .....

Instead, I got:

Beratung und Vertretung der österreichischen Tochtergesellschaft einer osteuropäischen Großbank in allen a .....

Means, the content of the field is displayed correct, but the name is not.
thanks in advance for your support.

I have tried to change the slug, the name, but didnt work either.

#921595

Hello,

There isn't "show_name" attribute for custom wysiwyg field, see our document:
https://toolset.com/documentation/customizing-sites-using-php/functions/#wysiwyg

I suggest you add the field name into your codes manually, for example:

<?php 
echo 'Aus unserer Praxis: ';
echo (types_render_field ('praxisbeispiele', array ('show_name' => 'true','output' => 'html'))); 
?>
#922691

Hi Luo,

thanks for your reply.
Given, that there is no way to show the Name of the field, why does it work than on the old version of the site?

<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                <div class="post-entry">
                    <?php the_content(__('Read more &#8250;', 'responsive')); ?>
                    <div class="zust-anwalt"><?php echo(types_render_field("zust-anwalt", array("show_name"=>"false","output" => "html"))); ?></div>
                	<div style="width: 90%;"><?php echo(types_render_field("praxisbeispiele", array("show_name"=>"true","output" => "html"))); ?></div>
                </div><!-- end of .post-entry -->

Here: hidden link

Background: I have to translate the page, so i cant hardcode the fields Name. And translating all the titles as strings with wpml would generate double work, raise complexity and maintainance efforts.

And once again - on the "old" site - which is still live until the new one gets finished - it still works out good with Types v1.0.4, and now you tell me, that the actual version is not capable to show the name on the frontend?? Please dont throw rocks on me, but i can´t believe that.

#922777

Thanks for the details, you are right, it is a known bug of Types plugin, and has been put into our to-do list, here is the feedback from our developers:
It is fixed in next version of Types plugin version 3.0.3, and we will update the document to add the "show_name" attribute.

Please let me know if you want to try the hot-fix files.

#922805

Thanks, yes I want to try the Hot Fix. That could be much better than the workaround with WPML Strings.

#922816

You can download the file from here:
hidden link

And use it to replace the file of Types plugin:
application/models/field/type/single-line/view/frontend.php

Please test and feedback if it is fixed.

#923733

Thanks, I implemented your file as described. No effect.

This is the code - I use WPML String Translation to show the Name as a translated string meanwhile. But that should be just a workaround.

<div class="zust-anwalt"><?php echo(types_render_field("zustandige-anwalte", array("show_name" => "true","output" => "html"))); ?></div>
                	<div style="width:90%;"> 
					<h3><?php echo __('Aus unserer Praxis:','responsive_2');?></h3>
					<?php echo(types_render_field('praxisbeispiele', array('show_name' => 'true','output' => 'html'))); ?></div>

Here an example:
hidden link

I still miss the fieldnames "Zuständige Anwälte" and "Aus unserer Praxis" in that example.

A question:
Is it correct, that i replace the file in /single-line/view and not in /wysiwyg/view? Just asking, because the field we are talking about is a wysiwyg field not a single line field.

#923836

Thanks for the feedback, you are right, our developers feedback that the "show_name" officially only checkbox field, the above hot-fix works only for single line text field, I have added this thread in our to-do list, our developers will take care of it.

#953173

Dear Toolset, please tell me what exactly do you mean with:
"I have added this thread in our to-do list, our developers will take care of it."
A) Find another solution by yourself, we might want to fix it or not, no futher plan
B) Developers will release a fix next week/month/ by end of July/ x / y ... ?
Thanks for a little bit more of orientation in advance,

#953175

Concerning my last question, I´ve found the answer at the middle of this thread: Toolset Developers will fix that issue with Types plugin version 3.0.3.
Looking forward for that fix.