WordPress Pages - Line Breaks / <br />

Discussion in 'PHP' started by bradleykirwan, Jul 23, 2010.

  1. #1
    Hi there,

    I am working on a wordpress theme, and when I go to add new pages and press enter twice between paragraphs, where there should be a gap - The qap is not showing.

    It appears as though wordpress is not saving returns with <br /> in them.

    Does anybody know how to change this, or possibly change my theme to allow this to function.

    Any help will be greatly appreciated, thanks.
     
    bradleykirwan, Jul 23, 2010 IP
  2. Deacalion

    Deacalion Peon

    Messages:
    438
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Wordpress won't save newlines as <br />... unless you explicitly type <br /> in the post. It's the function you're using to display the content.
    Use the_content() (replaces newlines with <br />) instead of get_the_content() (returns the post/page data unchanged)
     
    Deacalion, Jul 23, 2010 IP