Support » Requests and Feedback » Getting rid of the <p> before the_content

  • 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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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.

    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.

    have you tried this:

    What version of WP are you using?

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Getting rid of the <p> before the_content’ is closed to new replies.