/ Published in: PHP

strip html on loop
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php if (have_posts()) : while (have_posts()) : the_post();?> the_content(''.__('Read more <span class="meta-nav">»</span>', 'sandbox').''); $new_content = strip_tags($old_content, '<hr><div><p><a><em><b><input><form><img><textarea><li><ol><ul><table><tr><td><th><i><b><h1><h2><h3><h4><h5><h6>'); echo $new_content; ?> <?php endwhile; endif; ?> <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
Comments
