Wordpress post_content formatting / paragraph


January 31, 2012 at 10:02
Wordpress

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!

Hinterlasse einen Kommentar:
Search