Line break in custom field

Posted in: Newspaper
Post count: 55

I’ve created several custom fields based on the fields in the theme.

Unfortunately, line breaks contained in the text are not displayed.

How can I make them appear in the frontend?

Post count: 23312

Hello Marcus_S,

Unfortunately, I do not know what kind of custom fields you have created and I have no idea why these are not working good, sorry! Please notice that we cannot provide support for your additional customizations and implementations, sorry!

Thanks for your understanding!

Post count: 55

Hello,

i use this code for the Backend:

<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>	

On the Frontend i use the follow code:

<?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 $td_mod_single->td_post_theme_settings['td_infos'];?></div>
		<?php } ?>

But existing line breaks are not displayed

  • This reply was modified 8 years by Marcus_S.
Post count: 23312

Hello Marcus_S,

Sorry for this but please notice that we cannot help you because this request involves doing such a custom work and we can’t provide something like this at the moment, sorry!

Thanks for your understanding!

Post count: 55

Hi

Thanks for your replies.

The solution to my problem is here: https://iftakharhasan.wordpress.com/2015/09/23/wordpress-how-to-keep-the-line-breaks-in-meta-box-text-area- field /

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