WordPress.org

Ready to get started?Download WordPress

Forums

Blogger Importer
Text Alignment is lost when importing to WordPress (13 posts)

  1. NorthernBelleDiaries
    Member
    Posted 1 year ago #

    I have set up my hosting but have not begun really using WordPress because when I import my posts, I lost all formatting on my posts and images.

    They are all left-aligned. I use a combination of center and justifed alignment and I would have to have to go back and correct 200+ posts.

    Is there a way to export all of my posts and preserve their original alignment? I am about to pay big money for someone to do it for me, but I rather allocate that to buying the Genesis framework.

    Thank you!

    http://wordpress.org/extend/plugins/blogger-importer/

  2. Workshopshed
    Member
    Plugin Author

    Posted 1 year ago #

    It might be possible. The importer intentionally removes things like style tags as they are often closely associated with your theme and hence are not relavent for your new WordPress theme.

    In summary you will need to work out how your center aligned paragraphs have been styled. You will need to update a file to reflect this. Then remove all the freshly imported posts, empty the trash and reset the importer. You can then re-import the posts.

    Firstly examing the HTML blogger is using for your styling. Assuming that blogger has done the center styling via a "STYLE" tag.

    Open blogger-importer-sanitize.php and on line 16 you will find a long string of things that are stripped. Style is right at the end. Remove this and save the file. If you are working on a local copy, re-upload to your website.

    From WordPress dashboard locate your new posts and move to trash.

    Goto the trash and empty it.

    Return to the Blogger importer and choose the "Clear Account Information".

    Reconnect to blogger and re-import your data.

    ----

    Note if your old blogger theme uses a "class" to style the centre justified paragraphs then you should just be able to add that to your new WordPress theme.

  3. NorthernBelleDiaries
    Member
    Posted 1 year ago #

    Workshopshed thank you!

    I did the steps you listed above (deleted my imported posts, removed "style", cleared account information, and re-imported the data. It still looks the same.

    So I went back into the HTML of my posts and noticed that the alignment language reads as follows:

    <div class="separator" style="clear: both; text-align: justify;">

    I'm confused. So it uses both "style" and "class"?

    How do I add the "class" style to my WordPress theme?

    Thanks!

  4. Workshopshed
    Member
    Plugin Author

    Posted 1 year ago #

    Looking at http://www.northernbellediaries.com

    I see you've got a mix of line with the same style but different alignments. Here's an example from your current article

    <div style="text-align: center;"><span style="font-family: inherit;"><br /><span style="background-color: white; line-height: 21px; text-align: justify;">Lets get this party started</span><br /></span><br /><br /><br /><span style="font-family: inherit;"><br /><span style="background-color: white; line-height: 21px; text-align: justify;"><br /><br /><br /></span><br /></span><br /></div>

    I ran that through on my test blog and it worked fine with the alignment aligned on the desitination.

    Are you using the 0.5 version or the Beta version? There was an issue where the incorrect cleanup code (sanitiser class) was being run.

    http://core.trac.wordpress.org/attachment/ticket/4010/blogger-importer.zip

    Try the Beta (with no need to change any code) and see if that sorts your formatting issue.

  5. NorthernBelleDiaries
    Member
    Posted 1 year ago #

    I am using the 0.5 version.

    I will try using the Beta version and post an update. Thanks!

  6. NorthernBelleDiaries
    Member
    Posted 1 year ago #

    THANK YOU THANK YOU THANK YOU!

    This worked like a CHARM! There are still some
    missing between my paragraphs, but that's a non-issue compared to the alignment problems I had before.

    YOU ARE A LIFESAVER!

    Thank you!

    I wonder if there's a way to replace the Blogger
    coding in WordPress through the plug-in?

  7. NorthernBelleDiaries
    Member
    Posted 1 year ago #

    Sorry...the forum deleted parts of my reply.

    I was referring to the < br / > (I added spaces in there to stop the HTML from occurring)

  8. NorthernBelleDiaries
    Member
    Posted 1 year ago #

    I forgot to add that some of the images are duplicated within the posts, and some are blurry.

  9. Workshopshed
    Member
    Plugin Author

    Posted 1 year ago #

    There are find and replace and tidyup plugins in the respository that might help?

    The duplicate and blurry images is a very strange one, I've not heard of that before.

    Can you point me at one of the problem images on your source blog and I'll see if there is anything that can be done in the importer although I suspect not.

  10. NorthernBelleDiaries
    Member
    Posted 1 year ago #

    Here is the link to my temp blog's post that has both duplicate and blurry images: http://temp.northernbellediaries.com/2013/06/07/friday-freebie/

    Here is the original post (on Blogger): http://www.northernbellediaries.com/2013/06/friday-freebie.html

  11. Workshopshed
    Member
    Plugin Author

    Posted 1 year ago #

    What's happening there is it's resizing the "medium" picture to be 640 wide hence the bluring. If you go into your WordPress Dashboard, settings, media. You should see that there is a size for your medium pictures. You can change this to be the size you most commonly use.

    <img width="640" height="502" border="0" title="free iPhone wallpaper - Northern Belle Designs" src="http://temp.northernbellediaries.com/wp-content/uploads/2013/06/summertime-board-300x236.png" alt="free iPhone wallpaper - Northern Belle Designs">

    It's downloaded the large size file so you can change sizes at a later date if you want to.

  12. Workshopshed
    Member
    Plugin Author

    Posted 1 year ago #

    The double image might be something to do with your theme as it has the following attribute

    class="attachment-post-thumbnail wp-post-image"

    Look for something to do with post thumbnails.

  13. NorthernBelleDiaries
    Member
    Posted 1 year ago #

    Interesting. Thank you for all your help! I really do appreciate it!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic