WordPress post_content formatting / paragraph

If I fetch my wordpress data with get_post, then post_content is unformatted. nl2br doesn’t really help, but there is a better solution:

    $p = get_post($id);
    apply_filters('the_content', $p->post_content);

I just LOVE WordPress!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.