WordPress.org

Ready to get started?Download WordPress

Forums

Getting rid of the <p> before the_content (5 posts)

  1. punkrockshows
    Member
    Posted 9 years ago #

    I have created a template and am trying to match the posting style to that of my old news script. The problem I am having is that whenever the php is rendered, I end up with a < p > tag at the beginning of my content. I did not include a < p > tag in my theme's index.php, yet it renders it without fail. I assume that this < p > tag is somehwere in the filter_content subroutine? I can't find it anywhere to get rid of it. It dosent seem to make it to the DB. I used phpMyAdmin to look at all my posts, none of them contain the tag in question. Weird. It's pretty annoying, I have everything else exactly the way I want it.

  2. Avenir
    Member
    Posted 9 years ago #

    The <p> is inserted by WordPress's autop function. autop will add <p> elements to anything passed through it on the fly, so that's why you don't find the <p>'s in your database. Do a search for removing this filter from your content, and I'm sure you'll find some solutions.

  3. punkrockshows
    Member
    Posted 9 years ago #

    Alright, thanks for you guidance. I searched for autop and removing that particular filter and all the posts I found pointed me to the vars.php file. So I opened it up in ConTEXT and couldn't find any Add_filter sub. I know bouncing around answering questions is annoying and I appreciate your time.

  4. Jinsan
    Member
    Posted 9 years ago #

    have you tried this:

    http://wordpress.org/support/topic.php?id=20000#post-113960

    What version of WP are you using?

  5. punkrockshows
    Member
    Posted 9 years ago #

    I have 1.5. Thanks for that link, that was exactly what I needed! I appreciate this!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.