Search code examples
phpmysqlhtmlwordpressmarkup

Add HTML markup to $wpdb results in Wordpress


I'm pulling some data with the WPDB class in Wordpress, however - the data is being retrieved as raw data, without any markup.

How can I automatically add this markup?


Solution

  • Got it :)

    $text = apply___filters('the_content', $text);

    See reference at wp-includes/formatting.php