Skip to content

Instantly share code, notes, and snippets.

@simbasounds
Last active July 23, 2018 22:23
Show Gist options
  • Save simbasounds/d96fde5967813fe4b9bf to your computer and use it in GitHub Desktop.
Save simbasounds/d96fde5967813fe4b9bf to your computer and use it in GitHub Desktop.
Output WordPress unstripped content (with html tags). Add to functions.php and use ob_wp_content() in templates instead of the_content()
//* Output Content with html tags
function ob_wp_content($display = true) {
global $post;
ob_start();
the_content();
$output = ob_get_contents();
ob_end_clean();
if(!$display) {return $output;} else {print $output;};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment