Stop wordpress from adding html tags but not remove my own tags?
I've been trying to make wordpress stop adding html tags to my content but leave my own html tags alone?
Tried
remove_filter( 'the_content', 'wpautop' );
and installed PS Disable Auto Formatting but the problem is that it removes my own html tags aswell?
I've tried to get_the_content() and the_content() but the same problem occurs there...
The way I wan't this to work is to let me add html tags and leave these alone, not removing them. Like this:
<p>Some text here</p>
<p>some more text <span class="fat"> fat </span></p>
Solutions
The only way i've ever found (& maybe also the only one that actually works)
Install & activate the plugin TinyMCE Advanced
Go to the plugin's settings page & check the box against "Stop removing
<p>
&
<br>
tags"
Go to your post's edit screen, switch between visual & html editor as often as you like & see the difference
Try accessing the $ post object inside your loop, and echo'ing the content from that. Something like:
<?php echo $post->post_content ?>
Edit
If you need to parse shortcodes, use
do_shortcode()
:
<?php echo do_shortcode( $post->post_content ); ?>