I made a WP page with lots of content.
I coded this page very simply, but when processed through WP, the page displays fine but view source shows lots of extra ‘<p>’ tags where there are non in the actual code view. I want to be able to validate and cannot figure out how to get rid of them.
New to Wp,
not new to coding css /xhtml
It’s the xhtml that is not validating.
What I wrote into the WP editor:
blockquote class=”tiny” The General Plan
What shows up view source:
blockquote class=”tiny” <p> The General Plan
(left off the brackets so it would display here)
Any help ?
wordpress adds <p> tags to paragraphs.
end of story.
disable wpautop, or style the tags accordingly.
Well it’s adding p tags where there are no friggin’ paragraphs.
I got around the blockquote issue by styling a div tag to hold it..
but the online source is still not validating and even if i scrunched all the code in the window onto one line it puts p tags around stuff that it shouldn’t.
Any way, i see this is an old and unfixed issue within WP..i am not sure about that plugin, as eventually someone else will be adding content to this particular site.
What is says for me is that, if i cannot cut/paste my valid code into the code box of WP and have it output that code as valid, well it loses much of what I had thought would be a good development tool.
Just an update to others who are having this problem. After literally hours and hours of recoding (really simple code here folks) I finally figured out where my code and WP-TinyMc didn’t get along and kept me from validating.
Things like break tags in a div –
remedy make each line a p inside the div – a hassle for sure, but that stopped most of the stray closing p tags i was getting.
And add all your tags yourself,
like i had anchor tags within the main body of text, they threw a ending p tag error as well.
But if I added p tags around the anchor tag, the display was still ok and it validated.
Just a few things I noticed.
Whew–glad that is over.
- The topic ‘WP not displaying css as written’ is closed to new replies.