How to fix get_the_content() stripped tags in WordPress


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2. the_content(); // this is your standard way to output Post or Page content
  3. // now the test which works
  4. $var_content = get_the_content();
  5. $var_content = apply_filters( 'the_content', $var_content );
  6. $var_content = str_replace( ']]>', ']]>', $var_content );
  7. echo $var_content;
  8. ?>

URL: http://rider.sofarider.com/blog/wordpress-tips/how-to-fix-get_the_content-stripped-tags/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.