custom field - Line break description wordpress

Currently in Wordpress 5.1, I create custom fields including a description field using the text editor of worpress, howe

Currently in Wordpress 5.1, I create custom fields including a description field using the text editor of worpress, however I encounter a problem no line break is made. Is there a function for the line break to work

Currently in Wordpress 5.1, I create custom fields including a description field using the text editor of worpress, however I encounter a problem no line break is made. Is there a function for the line break to work

Share Improve this question asked Apr 11, 2019 at 14:29 Jeanne ThibertJeanne Thibert 135 bronze badges 2
  • Are you using code to create the custom fields? If so, it would help to include it in your question. – WebElaine Commented Apr 11, 2019 at 14:36
  • Excuse me hastebin/mofivivexi.xml – Jeanne Thibert Commented Apr 11, 2019 at 14:41
Add a comment  | 

1 Answer 1

Reset to default 0

You should use the filter to show the description. Try to replace $your_description with the custom field value.

$content = apply_filters('the_content', $your_description);
echo !empty($your_description) ? $content : __('Nothing to show!', 'your_textdomain');

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745461541a4628728.html

相关推荐

  • custom field - Line break description wordpress

    Currently in Wordpress 5.1, I create custom fields including a description field using the text editor of worpress, howe

    8小时前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信