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.
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')));
?>
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 ›', '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.
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.
Thanks, yes I want to try the Hot Fix. That could be much better than the workaround with WPML Strings.
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.
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.
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.
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,
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.