I wish to stop all HTML in posts.
Can anyone tell me how exactly to do it? Using strip_tags or any other way.
Thanks in advance.
I wish to stop all HTML in posts.
Can anyone tell me how exactly to do it? Using strip_tags or any other way.
Thanks in advance.
Just out of curiosity, why do you want to disable HTML tags?
And which tags do you want to disable?
I wish to stop all HTML in posts.
'prolly haven't gotten a response 'cuz you virtually answered your own question...
<?php echo strip_tags(get_the_content()); ?>
I really appreciate you replying with code as I am a PHP dummy ;-).
Ho do I edit this index.php code from my template or do I put your code somewhere else?
<?php $custom_fields = get_post_custom(); //custom fields ?>
<?php if (isset($custom_fields["BX_post_type"]) && $custom_fields["BX_post_type"][0] == "mini") { ?>
<hr class="low" />
<div class="minientry">
<?php echo BX_remove_p($post->post_content); ?>
<?php comments_popup_link('(0)', '(1)', '(%)', 'commentlink', ''); ?>
" class="permalink" title="Permalink"><?php the_time('M j, \'y') ?><!--, <?php the_time('h:ia') ?>-->
<!--<em class="author"><?php the_author() ?>-->
<?php edit_post_link('Edit','<span class="editlink">','</span>'); ?>
</div>
Thanks again.
Looks like you are already using a function to remove p tags. Replace that line. Be forewarned, if it works, the output will be completely unformatted and will probably look like one long run-on paragraph.
Thanks Beel. Sorted it.
Thanks Beel. Sorted it.
This topic has been closed to new replies.