Support » Fixing WordPress » editing posts, newlines

  • Hey,

    I’ve got a new WordPress site (2.0.5). I’m creating a few static pages, and I’m using just the plain HTML editor. I’ve got a couple of paragraphs in there, but instead of P tags I want to use BR tags to get bigger spaces and custom spaces between the paragraphs (there are some images in there, too, so I need control over the spacing).

    I’ve typed BR and can see these tags in the content in edit mode (if I reload the page in the editor I still see the BR tags), but, when the page is rendered in the public view, the BR tags are gone and are replaced by just one P tag so there is basically no spacing in the wordpress Page at all.

    How do I control this aspect of the content?


Viewing 5 replies - 1 through 5 (of 5 total)
  • You can give your p tags some “bottom space” by adding or adjusting the margin-bottom or padding-bottom in the stylesheet.

    Hey man,

    thanks for that.

    I realise I can do that by editing the stylesheet. The problem is, some of my static pages are quite unique in that I just want to be free to put in an extra line of space here or there if i need it (I have just a few static pages, but with different graphics requirements, and different sub-headings, etc).

    If I do it in the stylesheet, then it’ll apply for all p’s in all the Pages, or if I restrict it with classes, well, it just becomes more hassle.

    So is there any other way to get this functionality ?

    You can try disabling wpautop – copy this code into notepad, save as disableautop.php, load into your plugin folder, activate. I don’t know if it will help but it probably can’t hurt. Note, please: this may make no difference to whether you can insert and retain <br /> tags.

    Plugin Name: Disable Formatting
    Version: 1.0
    Plugin URI:
    Description: Switches wpautop formatting off for all entries.
    Author: Aaron Schaefer
    Author URI:
    remove_filter('the_content', 'wpautop');

    Other than that, setting up several page templates with the different spacings etc. (using different ids/classes in the stylesheet) would be the only thing I know of.

    Forgot to ask: have you tried using the html editor button to see if the <br /> tags will be retained that way?

    Yeah that helps loads mate. Thanks for that.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘editing posts, newlines’ is closed to new replies.