Posted By

Xtraboy on 02/25/10


Tagged

fix php html wordpress tags stripped


Versions (?)

How to fix get_the_content() stripped tags in WordPress


 / Published in: PHP
 

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

  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. ?>

Report this snippet  

You need to login to post a comment.