Dirty hack for Wordpress to realize a hard return
Ever wanted to have an extra white line in your post just because it looks nice? Searched the forums and all you got was replies to go straight into the CSS code? … But I just want that 1 line d*mned …
Mind you, It’s beyond dirty but very effective. Here’s how:
Put a “.” (dot) on a new line and give it the same color as the background.
.
Regards,
Gerard.
P.S. noticed the space above “Regards,” …
August 9, 2008
Tags: hack, post, wordpress Posted in: All ENGLISH articles, Technical

8 Responses
Gerard, I think I love you. My programmer won’t respond to my inquiries and I sure as heck don’t want to mess with the code in the WP theme. This worked beautifully. And I love that it’s sneaky.
Thanks so much–this works perfectly for me!
THANK YOU! It’s about time something worked!
I tried just a space and it seemed to work on explorer and safari. This way I didn’t have to try to match the . to the background.
Any reason why just a space would not work?
Thanks,
D
Hi David,
I’ve tried this and as it seems spaces (or empty lines in this case) are cleaned out by the editor. The editor is a version of TinyMCE incorporated in WordPress.
You could ofcourse add a hard break to the code via the ‘HTML’ tab, but when opened (or rather saved) only once via the ‘Visual’ tab, they are gone again.
Regards,
Gerard.
Thanks for making me feel like an idiot. Haha. I actually mean that too as this is something I’ve been extremely frustrated with for some time and never even thought of trying your solution despite it’s simplicity. Kudos!
Thank you ! Thank you ! Thank you ! Been superbly frustrated with the spacing thingy, what a relief !! Simple and it works
Kudos !!!
Excellent – that works very well! Am on Safari, and it keeps stripping out my hard breaks. Thankyou
Leave a Reply