17 May, 2012

Insert 'Read More' button in Blogger Imported posts in Wordpress

12:16 AM

If you have just imported your posts and comments from Blogger to WordPress then you might have faced two problems:
1. There is a '>' symbol prepended to each post title and post content.
2. Your 'Read more' button from blogger posts is missing.
I have found a simple solution for these problems.

Removing '>' symbol form WordPress posts

To remove '>' symbol from post titles and content, just run following two queries on you wordpress database:
UPDATE wp_posts SET post_title = TRIM(LEADING '>' FROM post_title)
UPDATE wp_posts SET post_content = TRIM(LEADING '>' FROM post_content)

Adding 'Read More' link in WordPress posts

To add 'Read More' link in blogger imported posts you need to run following MySql query on your wordpress database:
UPDATE wp_posts SET post_content = REPLACE(post_content, "<a name='more'></a>", '<!--more-->');
UPDATE wp_posts SET post_content = REPLACE(post_content, "<a name="more"'></a>", '<!--more-->');
Blogger identifies the 'Read More' link by "<a name='more'></a>" code snippet. But WordPress does this by finding "<!--more-->". So we have replaced all occurrences of "<a name='more'></a>" with "<!--more-->". Hope this works for you.
Note: Please take backup of your database before applying above hacks.

Written by

We are Creative Blogger Theme Wavers which provides user friendly, effective and easy to use themes. Each support has free and providing HD support screen casting.

0 comments:

Post a Comment

 

© 2013 Jquery Giants. All rights resevered. Designed by Templateism

Back To Top