CyberD.org
C:\ Home » Blog » Code » The Missing P Tag

The Missing P Tag

I updated this post recently with... an update. If it's a typo or other minor thing I usually don't mention this, but for notable updates I have an update shortcode I usually use. It shows up like so:

UPD: This is an important update!!!

...usually at the bottom of the updated post in question.

This time, however, the shortcode didn't work. The tags appeared as plain text and everything was appended the impending block of text like an ugly tumor.

I checked the spelling. I copied in the tags from another post where it did work. I pondered if maybe I'd added in a filter that prevented shortcodes from running in the front page specifically... but what was strange was that the prepended line break wasn't showing either.

I deleted the shortcode and tried updating the post with just the text. The line break was still missing.

I copied and pasted via Notepad - to get rid of any potentially erroneous formatting. I added multiple line breaks. I added in new paragraphs. I eventually checked the source code to see if there was something I just couldn't see via the text editor... and it was missing a <p> tag.

For some reason no matter how many line breaks I added after the final line it just wouldn't break, shortcode or no. The p tag (that is otherwise inserted automatically each time you break a line in the WP text editor) just was not there.

Why? I have no idea. I Googled: no result. I finally added in extra </p> and <p> tags where the break was supposed to occur and... that works. For now. If in the future that post starts looking weird again, maybe the missing p tags have finally returned.

Comments

Keep track of the discussion via rss? Read about comment etiquette? Or type in something below!
This was pretty damn interesting. And yet, nobody's spoken! Be the first!


The Comment Form

Your email address will not be published. Required fields are marked *

Your email is saved only to approve your future comments automatically (assuming you really are a human). ;) It's not visible or shared with anyone. You can read about how we handle your info here.

Question   Razz  Sad   Smile  Redface  Biggrin  Surprised  Eek   Confused   Cool  Mad   Twisted  Rolleyes   Wink  Idea  Neutral

Privacy   Copyright   Sitemap   Statistics   RSS Feed   Valid XHTML   Valid CSS   Standards

© CyberD.org 2020
Keeping the world since 2004.