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
This was pretty damn interesting. And yet, nobody's spoken! Be the first!
© CyberD.org 2025
Keeping the world since 2004.
The Comment Form