Why do I lose all the slashes, i.e., ” \ “, in my blogs when I import XML files by the WordPress Importer plug-in?

The importer calls wp_insert_post() which runs stripslashes_deep() on the data. But the exporter doesn’t run addslashes. Looks like a bug to me. What you may try is to prepare the data during export. Create a plugin with the following content and activate it before you run the export: <?php /** * Plugin Name: Slash my … Read more

One Click demo content installation feature in WordPress theme options panel

if you check the WordPress importer plugin it is easy to implement this feature. But if you want the direct answer , here it is First of all, we need to copy the WordPress importer plugin files to our theme directory. like this 1. themes/bootstrapguru_theme/inc/wordpress-importer.php 2. themes/bootstrapguru_theme/inc/parser.php you can find this plugin here wordpress importer … Read more

How to add featured thumbnail into import XML?

Got a working solution, This is the post item <item> <title>title1</title> <pubdate>2013-02-20 10:33:58</pubdate> <dc:creator> <![CDATA[ David Jennings ]]> </dc:creator> <guid ispermalink=”false”>http://wordpress/?p=1234</guid> <description> <title>Title</title> </description> <content:encoded> <![CDATA[ABCD]]> </content:encoded> <excerpt:encoded> <![CDATA[ ]]> </excerpt:encoded> <wp:post_id>1234</wp:post_id> <wp:post_date>2013-02-20 10:33:00</wp:post_date> <wp:post_date_gmt>2013-02-20 10:33:00</wp:post_date_gmt> <wp:comment_status>open</wp:comment_status> <wp:comment_status>open</wp:comment_status> <wp:ping_status>open</wp:ping_status> <wp:post_name>title1</wp:post_name> <wp:status>publish</wp:status> <wp:post_parent>0</wp:post_parent> <wp:menu_order>0</wp:menu_order> <wp:post_type>post</wp:post_type> <wp:post_password></wp:post_password> <wp:is_sticky>0</wp:is_sticky> <category domain=”category” nicename=”blog”> <![CDATA[ blog ]]> </category> <wp:postmeta> <wp:meta_key>_thumbnail_id</wp:meta_key> … Read more

What exactly does the import tool do?

how is “already present” defined here anyway (post_id? term_id? name)? The post title and date must match to be already present. The WordPress post_exists() function is used to determine if the post exists. From the plugin code: $post_exists = post_exists( $post[‘post_title’], ”, $post[‘post_date’] ); The is no filter provided to change this behavior. For posts: … Read more