WordPress.org

Ready to get started?Download WordPress

Forums

Thesis theme text problem after import from blogger (23 posts)

  1. jennifer
    Member
    Posted 2 years ago #

    H there! I imported a blog from blogger (http://www.mylifeonmatchandmore.com/)
    into wordpress: (http://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!

  2. Brett
    Member
    Posted 2 years ago #

    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.

  3. jennifer
    Member
    Posted 2 years ago #

    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?

  4. Brett
    Member
    Posted 2 years ago #

    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.

  5. jennifer
    Member
    Posted 2 years ago #

    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.

  6. Brett
    Member
    Posted 2 years ago #

    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.

  7. jennifer
    Member
    Posted 2 years ago #

    okay I will try doing that, thanks!

  8. jennifer
    Member
    Posted 2 years ago #

    (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?

  9. Brett
    Member
    Posted 2 years ago #

    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');
    ?>
  10. poddys
    Member
    Posted 2 years ago #

    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.

  11. jennifer
    Member
    Posted 2 years ago #

    @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.....

  12. jennifer
    Member
    Posted 2 years ago #

    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...

  13. Brett
    Member
    Posted 2 years ago #

    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?

  14. jennifer
    Member
    Posted 2 years ago #

    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.

  15. Brett
    Member
    Posted 2 years ago #

    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.

  16. jennifer
    Member
    Posted 2 years ago #

    okay got it. about to test it now....

  17. Brett
    Member
    Posted 2 years ago #

    Granted you probably need to weed out the <p> tags you already have in there...

  18. jennifer
    Member
    Posted 2 years ago #

    Right.... well I tried it on posts I didn't add <p> tags to and it still didn't work. It made the font large and centered rather than left justified.

  19. Brett
    Member
    Posted 2 years ago #

    Really? Hmm, I didn't see that behavior (I was refreshing a lot over here)...

    What browser were you using?

  20. jennifer
    Member
    Posted 2 years ago #

    I'm using chrome, but I also tested it in safari. Neither worked... it just broke the design and the side bar is at the bottom of the page under the posts and the fonts are large for the teaser stories. uggg. i wish it would work :(

  21. Brett
    Member
    Posted 2 years ago #

    could you try it again so I could see? It's definitely weird behavior....

  22. jennifer
    Member
    Posted 2 years ago #

    yeah definitely. here is the link:

    http://test.mylifeonmatchandmore.com/wordpress/

  23. jennifer
    Member
    Posted 2 years ago #

    I just now reverted it to what it was before adding that code....(my client who I'm doing the blog for is looking at it and I didn't want it to look weird.)

Topic Closed

This topic has been closed to new replies.

About this Topic