0

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

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');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.