• Hi there,
    I successfully imported 150 entries from MT to WP. However here’s the problem:

    After Exported from MT is the code:
    <div class=”related”><h1>Related Links</h1> bla bla</div>

    After Imported into WP is the code:
    <div><h1>Related Links</h1> bla bla</div>

    I’ve lost the “class=”related””! …any ideas on how to keep it or easily add it to *some* of my 150 entries?

    thanks,
    Jessica I

Viewing 3 replies - 1 through 3 (of 3 total)
  • i’ve done a number of MT/TP to WP migrations, if the div/class tags are embedded within the body of a post, you’re going to need to go back to each post through dashboard->manage->posts and edit each one, a pain, i know, at least you only have 150 posts, one of the imports I did had over 4000 posts spanning 3 years, i wrote a small perl script to make various changes needed to fix the many ‘quirks’ found after importing to WP. it’s probably not worth the effort to write/customize the script for only 150 posts though.

    if the tags are NOT inside of each post, but rather are the “post” tags themselves, you can then easily change/edit to your heart’s content from within your theme’s .php files using if statments to change the class name as needed.

    Thread Starter jessicai

    (@jessicai)

    Thanks! at least I’m on the right track …is there any way to use PHPmyadmin to do a search and replace on this?
    editing every post sounds painful!!
    Jessica I

    Yes you could do a search and replace and here’s a plugin that could help you if you have any confusion on how to use the MySQL replace utility. It should go something like:
    $query = “UPDATE $wpdb->posts “;
    $query .= “SET post_content = “;
    $query .= “REPLACE(post_content, \”$search_text\”, \”$replace_text\”) “;
    $wpdb->get_results($query);

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘import from MT – Lost class attributes on div’ is closed to new replies.