I write a custom type for wordpress which is contain a textarea. I can save it and also i can access from single view. But i want to show them line by line if author save it line by line. But it’s not showing them line by line, it shows all of them as a single line.
Here is my single.php’s custom meta show codes;
<div id="yemek_resim">
<?php if($tz_image_display == 'true') : ?>
<?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) : /* if post has post thumbnail */ ?>
<?php the_post_thumbnail('single-large'); ?>
<?php endif; ?>
<?php endif; ?>
</div><!-- yemek_resim -->
<div id="yemek_malzemeleri">
<?php
$malzemeler = get_post_meta($post->ID, 'ofa_yemek_malzemeler', true);
echo esc_attr($malzemeler);
?>
</div><!-- yemek_malzemeleri -->
here yemek_malzemeler’s content come from a textarea and author can write multiline content. But at site, they seem as a single line…
I resolved the problem by using
<pre> </pre>tags. thanks for your care.