Forums

[resolved] the_content includes a paragraph (8 posts)

  1. tcurdt
    Member
    Posted 3 years ago #

    Why on earth does "the_content" include a surrounding tag?
    Is there any way around that? I want to add a class to it like this

    <p class="entry">
    <?php the_content(); ?>

  2. jaredquinn
    Member
    Posted 3 years ago #

    You could still wrap the entire lot in a div and reference it in CSS as:

    #divname P

    and define

    #divname P P

    as the paragraphs inside the enclosing p's

  3. tcurdt
    Member
    Posted 3 years ago #

    Hm... a pretty ugly work around IMO. Not what I am looking for. But thanks anyway!

  4. jaredquinn
    Member
    Posted 3 years ago #

    It's part of the CSS standard, not really a work-a-round.

  5. vkaryl
    Member
    Posted 3 years ago #

    If you don't like jaredquinn's solution, your only other option will be to hack core code....

  6. FekketCantenel
    Member
    Posted 3 years ago #

    vkaryl
    If you don't like jaredquinn's solution, your only other option will be to hack core code....

    What file would need to be hacked in order to do this?

  7. FekketCantenel
    Member
    Posted 3 years ago #

    tcurdt, I'm happy to say I think I've found the perfect solution.

    http://dev.wp-plugins.org/browser/wp-unformatted/trunk/

    This is a plugin written by alexking; his homepage is alexking.org. Plug it in, read the instructions, and from what I can see, it works fine!

  8. tcurdt
    Member
    Posted 3 years ago #

    Thanks, that's what I was looking for!

Topic Closed

This topic has been closed to new replies.

About this Topic