• jennifer

    (@jenniferglasgow)


    H there! I imported a blog from blogger (https://www.mylifeonmatchandmore.com/)
    into wordpress: (https://test.mylifeonmatchandmore.com/wordpress/)

    For some reason, all the text in the posts are off. Like some have a space under a paragraph, and others have no space (where they are supposed to have a space). Pretty much all the paragraphs are jumbled together. Then, when I go to edit the text, it looks fine in the text editor.

    Also, I am using the Thesis theme in wordpress. I am not sure if this is a thesis issue or if it’s an exporting and importing the blog issue. Any ideas?

    Thanks!

Viewing 15 replies - 1 through 15 (of 22 total)
  • I am curious if you are viewing your post in Visual editor or HTML? If it is Visual, click on HTML and see what kind of code you see.

    Thread Starter jennifer

    (@jenniferglasgow)

    In HTML, I see the text, then the appropriate </div> tags at the end of each paragraph. For some reason these </div> are not working correctly, because when I go to the live view of my blog there are no spaces where in the html I saw there are </div>
    tags… So the html seems to be correct. Why could the live view not be showing up correctly?

    No need to have the div tags to separate paragraphs. Get rid of them. There is no need to even list the paragraphs within p tags either.

    Thread Starter jennifer

    (@jenniferglasgow)

    oh okay…. that probably would take hours as it’s happening to the whole blog which has tons of blog entries. Is there a shorter way to fix the problem?

    It’s just strange, because in blogger, the posts show up with perfect spacing, but when exported to wordpress, the spacing got all messed up.

    Well it could be something with the CSS of Thesis (love that theme framework btw).

    But yeah, no reason to have div’s for paragraph tags. WordPress handles all that for you without all the extra code. Check to see on at least one post to see if that fixes the problem for you.

    Thread Starter jennifer

    (@jenniferglasgow)

    okay I will try doing that, thanks!

    Thread Starter jennifer

    (@jenniferglasgow)

    (I love the thesis framework too!)

    so I tried manually deleting the div’s and it worked, but I don’t think I will be able to do that for the 70+ blog posts on the blog….

    I wonder if this is something that happens to a lot of people when exporting a blogger blog to wordpress?

    Hmm. Excellent question. I did find the answer to your question. If you copy this into your custom_functions.php in Thesis, this SHOULD do the trick for you. Trial and error, let me know either way.

    This is adapted from this post. Tested on a local install and it seems to work.

    <?php
    // Replaces all <div> in the_content with <p>
    function clear_replacedivopen($content){
    	return str_replace("<div>","<p>", $content);
    }
    add_filter('the_content', 'clear_replacedivopen');
    
    // Replaces all </div> in the_content with </p>
    function clear_replacedivclose($content){
    	return str_replace("</div>","</p>", $content);
    }
    add_filter('the_content', 'clear_replacedivclose');
    
    // Clears all empty <p></p> in the_content()
    function clear_emptyp($content){
    	return str_replace("<p></p>","", $content);
    }
    add_filter('the_content', 'clear_emptyp');
    ?>

    For the less technical, you can always copy/paste the complete post into Word, Notepad or any other text editor (I like Notepad++), then do a global replace of <div>, </div>, <p> and </p> by nothing. Afterwards, copy/paste and overwrite what was in the original post.

    Time consuming, but not too bad with 70 posts or less. An automatic solution is a lot quicker, and less prone to error as well.

    Thread Starter jennifer

    (@jenniferglasgow)

    @brett – I copy and pasted that code into my thesis custom_functions.php, and it created the paragraphs in all the right places, but now the entire design seems to be broken along with that…. i.e. The side bar is now at the bottom of the page, fonts are different sizes in the teaser stories at the bottom, and they are not within their margins. Do the <div> tags determine borders ??

    @proddys I could try doing that, although I am worried the same thing might happen with the design being broken….

    I did try just adding <p> after each </div> and <div> and the paragraphs seemed to show up correctly. I just will have to do that for all 70 posts…..

    Thread Starter jennifer

    (@jenniferglasgow)

    oh and one more thing… when I add <p> after a <div> the layout is broken (side bar at bottom, etc). When I add <p> after </div> the layout does not get broken. I am not sure why that is….. but just thought I’d add that…

    Hmmm, let me check on this… you wouldn’t have to add the php tags around the code itself, but let me load up thesis on a site and check first.

    Also, you don’t need to add <p> tags to the post for the paragraphs to appear. The beauty of WordPress it does add it in there for you. Just like typing in posts here in the forums. Understand?

    Thread Starter jennifer

    (@jenniferglasgow)

    okay thank you! Let me know what you find…. I’m so curious.

    You’re right, you wouldn’t think I would need to add the <p> tags, but for some reason, the paragraphs are not indenting unless I do add the <p> tags. so strange.

    Okay… that was it. Make sure you don’t add in the <?php and the ?> from the code above when you paste it into your custom_functions.php file.

    Thread Starter jennifer

    (@jenniferglasgow)

    okay got it. about to test it now….

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘Thesis theme text problem after import from blogger’ is closed to new replies.