I am using $page = get_page_by_title('name')
; to get the contents of a page. When I echo $page->post_content;
none of the content is wrapped in p tags like it is when run threw the normal wordpress loop using the_content(
). Is there a different way I should get this data so it will contain the proper tags?
Add a comment
|
1 Answer
You can apply the content filters to $page->post_content
like so:
echo apply_filters('the_content', $page->post_content);