Friday, June 8, 2018

How to print text from custom fields in html format

Add to functions.php

To print in your template file
$unformatted_content = get_post_meta($postID, 'custom-field-name', true);
$formatted_content = apply_filters('meta_content', $unformatted_content);

No comments:

Post a Comment