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,” … :-)

Post to Twitter

August 9, 2008  Tags: , ,   Posted in: All ENGLISH articles, Technical

8 Responses

  1. Agatha - April 10, 2009

    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.

  2. Julie - April 29, 2009

    Thanks so much–this works perfectly for me!

  3. Emily - May 5, 2009

    THANK YOU! It’s about time something worked! ;)

  4. David Levesque - July 14, 2009

    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

  5. admin - July 14, 2009

    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.

  6. Ryan DeGraw - August 19, 2009

    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!

  7. Kumar - September 14, 2009

    Thank you ! Thank you ! Thank you ! Been superbly frustrated with the spacing thingy, what a relief !! Simple and it works :) Kudos !!!

  8. crownfolio - February 9, 2010

    Excellent – that works very well! Am on Safari, and it keeps stripping out my hard breaks. Thankyou

Leave a Reply