WordPress.org

Ready to get started?Download WordPress

Forums

editing/removing the <p> tag that automatically surrounds the_content (7 posts)

  1. fire-enigmax
    Member
    Posted 6 years ago #

    When I call the_post there seems to automatically be paragraph <p> tags placed around the text, Can someone tell me where this is configured so that i can either remove the <p> tag to allow for manual inserting where I want so that I can define a particular class be assigned etc for each individual loop/post.

    On this note - is there any documentation/tutorial etc which lists where all the other 'functions' are formatted (it the_title... etc) so the same can be done with these?

  2. mozey
    Member
    Posted 6 years ago #

    any news on this issue? i'm actually going thought he same thing.

  3. mozey
    Member
    Posted 6 years ago #

    OKay, i stumped across a plugin which removes the P's from the excerpt. SO i modified it to do so for the content. Here it is with credits to the original author!, LOL ONE LINER :)

    <?php
    /*
    Plugin Name: No Content-P
    Description: Removes the paragraph tags from the output returned by the_content() function
    Version: 1.0
    Author: Amit Gupta
    Author URI: http://blog.igeek.info/
    */
    remove_filter('the_content', 'wpautop');
    ?>

  4. Buckycat7
    Member
    Posted 6 years ago #

    Where does this code go to make this work?

    These p tags are killing my CSS.

  5. germanny
    Member
    Posted 6 years ago #

    Thank you, mozey! Your code mod has saved me a sleepless night!

    ~ jen

  6. raphaefeli
    Member
    Posted 6 years ago #

    AWESOME! THANKS!

    THIS ISSUE WAS KILLING MY XHTML VALIDATION!

  7. Muhammad Ali
    Member
    Posted 6 years ago #

    Thank you so much.... for the code.

Topic Closed

This topic has been closed to new replies.

About this Topic