开发者

WordPress: Importing multiple categories?

开发者 https://www.devze.com 2023-01-30 13:21 出处:网络
I am working on a directory site based on Wordpress and I need to import categories and members from an existing website. WordPress currently has an importer tool that is said to allow imports of cate

I am working on a directory site based on Wordpress and I need to import categories and members from an existing website. WordPress currently has an importer tool that is said to allow imports of categories...but it's in the WXR format.

From my understanding, a WXR is a XML file, but I'm not sure the exact format to use for the category and member imports (if that is even possible).

I searched different sources for a solution to this but couldn't find anything.

I have over 70 categories and over 600 business members to import. I would appreciate 开发者_如何学Pythonany advice on importing multiple categories & members into WordPress.

Thanks a lot


I found a solution to import multiple categories. I used the WordPress export and exported all the information from my site (posts, categories, ect). Then I carefully looked through the xml file and found the type of data I wanted to import (which was categories). So once I found the categories and its format, I removed everything else in between the ... tags, after the file details (titles, link, description, pubDate, generator, ect).

The category format is:

<wp:category><wp:category_nicename>"This is the Slug name" (no quotes</wp:category_nicename><wp:category_parent>"This is the parent name, optional" (no quotes)</wp:category_parent><wp:cat_name><![CDATA["This is the Category name" (no quotes)]]></wp:cat_name></wp:category>

You would create as many of this example as you need and just change the required information for the import. I think this strategy can also be used for other data to import. You would just have to examine the structure of the data in the original xml exported file and basically copy what you see.

Im still open to other techniques to import data. I hope this helps someone with importing needs.

0

精彩评论

暂无评论...
验证码 换一张
取 消