Every time you post something the_content is shown on your page like this ...
<p>the_content</p>
... even tho you didn't input this into your post.
How do I remove <p> and </p> from my content? Does anyone know?
Thanks,
Alex
Every time you post something the_content is shown on your page like this ...
<p>the_content</p>
... even tho you didn't input this into your post.
How do I remove <p> and </p> from my content? Does anyone know?
Thanks,
Alex
Nobody knows? :/
Two ways:
the hard way - comment out the autop filter for content in the default filters file. (wp-includes/default-filters.php)
The better way: install Text Control plugin. Works great for p's and also for quote misery in code. Adds two buttons to your Admin/ Write page.
If anyone gets to this post I suggest you go here http://mtdewvirus.com/code/wordpress-plugins/ and get the smallest plugin ever created called Disable WPautop. It is the simplest way it can be done.
Thanks for replying tho varkenshand ;)
You could always just replace <?php the_content(); ?> with
<?php echo $wpdb->get_var("SELECT post_content FROM $wpdb->posts WHERE ID = $id");?>.
Thanks for all the suggestions. For the benefit of future users, the waydomatic idea didn't work with the exec-php plugin.
BUT Disable WPautop works GREAT. Thanks a ton to varkenshand and everyone who gave me input. It was really helpful.
or if you go into
wp-includes/default-filters.php
you can edit around line: 123
add_filter('the_content', 'wpautop');
and just comment that out with //
//add_filter('the_content', 'wpautop');
voila! no plug in overhead and no more <P> tags messing up your images
just curious, why would one want to remove the <p> tags in content ? isn't that the way content should be formated ?
i've never seen content without the use of paragraph tags or am i missing something here
gspark, you're missing something. =)
WP inserts Ps in all kinds of places that it just doesn't belong.
well from this discussion board i tried this
and just comment that out with //
//add_filter('the_content', 'wpautop');
then this..
http://yeago.net/works/problem-issue-with-wordpress-messing-up-html-with-p-and-br-tags
then this
http://urbangiraffe.com/plugins/disable-wpautop/
and still have the problem.. any other suggestions would be appreciated.. one that works with the 2.2 and above?! couple of these are very dated and wordpress has changed since..
This topic has been closed to new replies.