Text formatting in the custom fields

Posted in: Newspaper
Post count: 55

How can I format text in the custom fields? I have to mark appropriate places with me for example with < strong >.

That worked until some time ago. Now the command is displayed in plain text.

For example these post: https://salzsau-panorama.de/2017/11/26/wahre-musik-kenner-und-liebhaber/ under ‘Ergänzende Informationen’

Post count: 23312

Hello Marcus_S,

Unfortunately, I did not find an element which you are referring to in your example post, sorry! Provide some suggestive screenshots so I will be able to provide a more accurate response.

Thanks for your understanding!

Post count: 55

Hello Catalin,

Here is a Screenshot, which i mean.

And that’s the code I used to create the custom field
<div class="td-meta-box-row">
<?php $mb->the_field('td_infos'); ?>
<span class="td-page-o-custom-label">Ergänzende Informationen:</span>
<textarea name="<?php $mb->the_name(); ?>" class="td-textarea-subtitle"><?php $mb->the_value(); ?></textarea>
<span class="td-page-o-info">Ergänzende Informationen</span>
</div>

And hereby I give out the content of the field in the blog post

<?php if (!empty($td_mod_single->td_post_theme_settings['td_infos'])) { ?>
<span class="info_title">Ergänzende Informationen</span><br />
<div class="info_inhalt"><?php echo nl2br ( esc_html ( $td_mod_single->td_post_theme_settings['td_infos']));?></div>
<?php } ?>

Post count: 20688

Hi,

I have tried the same code you are using, the HTML tags are not interpreted in my case as well
https://www.screencast.com/t/XUyKlrSpz
Removing the esc_html from the code seems to interpret the HTML code
https://www.screencast.com/t/yCMqLbYbAB
https://www.screencast.com/t/O56mqxBOA
You could try it like that.

Thanks

Post count: 55

It seems to work!

Thanks Simion

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.