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
1 Answer
Reset to default 0You 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');