Old 21-02-2012, 20:57   #1 (permalink)
calder12
Senior Member
 
calder12's Avatar
 
Join Date: Apr 2011
Posts: 2,346
Wordpress Line Breaks?

I checked Google for this but didn't find a standard answer, since a few of you are very good at dealing with WP I thought I'd ask here.

I'm setting up just a basic blog for the boss, but when I try creating a post (copying and pasting from our main site) all the breaks between paragraphs go away. When I look at the HTML portion of the editor it is putting each paragraph in as a div then an empty div in between them.

So any thoughts or experience on how to deal with this?

Thanks.

*edit - strange it only does the div thing when copied from the web. If I copy it from notepad it works fine.
  Reply With Quote
Old 21-02-2012, 21:01   #2 (permalink)
teapoted
~
 
teapoted's Avatar
 
Join Date: Feb 2008
Location: London
Posts: 6,722
Copy+paste into the visual editor can retain all sort of weird things.

You should really copy it in pure plain text into the html editor and then style from the visual after. It's the only 'reliable' way.

If not, you could try from word, I have a site where they always do that and it turns out 'fine'. But it does often add some weird spans.

6000 posts so I'll say the obligatory. FYT™

Edit:

Paragraphs should come automatically if you haven't told them not to. (or the theme has). But I'd suspect that the divs being put in there from copy-pasting that site has stopped it from putting the paragraph breaks.
__________________

Last edited by teapoted : 21-02-2012 at 21:11.
  Reply With Quote
Old 21-02-2012, 21:24   #3 (permalink)
calder12
Senior Member
 
calder12's Avatar
 
Join Date: Apr 2011
Posts: 2,346
Yeah at the moment it's the default theme so it must be pasting from the web. The boss generally writes the posts in Word but she's more than capable enough to paste them into a text editor before putting them on the blog, who knows she might even like the online editor.

Hopefully I don't have a lot of dumb questions, but thanks for your answer. Google is getting a workout today from me.
  Reply With Quote
Old 21-02-2012, 21:25   #4 (permalink)
socreative
addicted
 
socreative's Avatar
 
Join Date: Jun 2009
Location: Moist Blighty
Posts: 5,207
use this plugin WordPress › TinyMCE Advanced « WordPress Plugins

tell it not to remove empty paragraphs
  Reply With Quote
Old 21-02-2012, 21:30   #5 (permalink)
jamblo
cuttin' and stickin'
 
jamblo's Avatar
 
Join Date: Jan 2008
Posts: 2,387
Or use the Paste from Word/Paste from Text buttons you get with Tiny MCE
__________________
  Reply With Quote
Old 21-02-2012, 21:40   #6 (permalink)
calder12
Senior Member
 
calder12's Avatar
 
Join Date: Apr 2011
Posts: 2,346
You think they'd turn TinyMCE Advanced on by default when you install it, I had to go to it's settings to get it to show up. Thanks, if nothing else it gives a few more toys to play with.
  Reply With Quote
Old 22-02-2012, 19:03   #7 (permalink)
calder12
Senior Member
 
calder12's Avatar
 
Join Date: Apr 2011
Posts: 2,346
Well I do believe I'll keep my noobish questions to one thread.

How do I do the 'read more' thing? Meaning I don't want the entire posts on the listings pages, just an excerpt then the read more link. I have the settings > reading > For each article in a feed, show set to Summary, but that doesn't appear to do what I wanted (I'm not actually sure what that did at all to be honest.)
  Reply With Quote
Old 22-02-2012, 19:26   #8 (permalink)
Tom
Moderator
 
Join Date: Jan 2007
Posts: 9,817
In the relevant loop, change the_content() to the_excerpt()
  Reply With Quote
Old 22-02-2012, 19:43   #9 (permalink)
calder12
Senior Member
 
calder12's Avatar
 
Join Date: Apr 2011
Posts: 2,346
Just found that, thanks Tom!

Is there any way to change the length of the_excerpt?

Scratch that found that too.
  Reply With Quote
Old 22-02-2012, 20:00   #10 (permalink)
Starbright
Senior Member
 
Starbright's Avatar
 
Join Date: Feb 2007
Location: Leicester, UK
Posts: 7,450
Or you can keep it as the_content() and manually add a read more 'break' in each post - there's a button for it in the editor.
__________________
  Reply With Quote
Old 22-02-2012, 20:06   #11 (permalink)
calder12
Senior Member
 
calder12's Avatar
 
Join Date: Apr 2011
Posts: 2,346
Yeah I did that to the 7 posts we already have and didn't at all like the way it was doing it, if the "Read more" went to a new line it looked like it was breaking to a new paragraph for some reason, probably the altered theme I'm using but it looked fugly, even though in the source it wasn't broken...

I much prefer the_excerpt just because I won't be typing these and it gives a consistent size to the post on the pages.

The more I play with this the more I like it, off to Google some more and see what other neat things I can do =D
  Reply With Quote
Old 22-02-2012, 20:59   #12 (permalink)
Starbright
Senior Member
 
Starbright's Avatar
 
Join Date: Feb 2007
Location: Leicester, UK
Posts: 7,450
Yeah, I always use the_excerpt() - was just letting you know of the other way to do it!
__________________
  Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive
vBulletin © 2000-2009 Jelsoft Enterprises Limited.
Search Engine Optimization by vBSEO 3.0.0 RC8