Print page content with formatting when doing custom SQL query
You need to run the post_content filters. It is a one line change from your current code. This… echo $footerElement->post_content; … should be … echo apply_filters(‘the_content’,$footerElement->post_content); That will give you all the same formatting as with normal posts. You can of course pick and choose which filters you want to run, instead of running them … Read more