I am benefiting from pages using the get_pages function and echoing the page content like: $page->post_content, but unlike the_content(), by doing this wordpress wont add p tags instantly, can there be in whatever way to include them here?

Thanks ahead of time

You need to use <?php echo apply_filters('the_content', $page->post_content); ?>

Make use of the [cde] function.

This can be what your searching for?


Jose Carlos' response is really the greater approach. As they are, 'the_content' filter is packed with the next actions:

  • capital_P_dangit
  • wptexturize
  • convert_smilies
  • convert_chars
  • wpautop
  • shortcode_unautop
  • prepend_attachment

So that you can see that you have a much more intelligence behind the hepa filter. If you are positive you don't require the other things (are you currently 100% sure you may never have shortcode or smilies inside your text?) then proceed and employ wpautop(), however, you may be sorry afterwards.