嘿,伙计们,有没有可能在自定义字段输入框中用段落自动设置文本格式?
e、 g.就像普通的文本小部件一样,当有换行符时,它可以选择说“自动添加段落”。
我只想让我的博客作者不用在自定义字段的每一行末尾键入内容!
有没有办法做到这一点?
更新时间:
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post();
$sidebar_title = get_post_meta($post->ID, \'sidebar-title\', $single = true);
$sidebar_text = get_post_meta($post->ID, \'sidebar-text\', $single = true); ?>
<?php if ( $sidebar_title !== \'\' && $sidebar_text !== \'\' ) { ?>
<li class="widget-container widget-light-blue custom">
<h3 class="widget-title"><?php echo wpautop($sidebar_title, $br); ?></h3>
<?php echo wpautop($sidebar_text, $br); ?>
</li>
<?php } ?>
<?php endwhile; ?>
<?php endif; ?>