XML-шаблон для импорта в WordPress

auStern
На сайте с 30.03.2007
Offline
167
1990

Ищу пример шаблона для импорта записей в WordPress. У кого есть - поделитесь пожалуйста, заранее благодарю ;)

Кирпич
На сайте с 23.06.2007
Offline
44
#1

Как-то так

<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your blog. -->
<!-- It contains information about your blog's posts, comments, and categories. -->
<!-- You may use this file to transfer that content from one site to another. -->
<!-- This file is not intended to serve as a complete backup of your blog. -->

<!-- To import this information into a WordPress blog follow these steps. -->
<!-- 1. Log into that blog as an administrator. -->
<!-- 2. Go to Manage: Import in the blog's admin panels. -->
<!-- 3. Choose "WordPress" from the list. -->
<!-- 4. Upload this file using the form provided on that page. -->
<!-- 5. You will first be asked to map the authors in this export file to users -->
<!-- on the blog. For each author, you may choose to map to an -->
<!-- existing user on the blog or to create a new user -->
<!-- 6. WordPress will then import each of the posts, comments, and categories -->
<!-- contained in this file into your blog -->

<!-- generator="Domain" created="{$channel.created|date_format:'%Y-%m-%d %H:%M'}"-->
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:wp="http://wordpress.org/export/1.0/"
>

<channel>
<title><?php echo $this->channel['title'] ?></title>
<link>http://<?php echo $this->channel['url'] ?></link>
<description><?php echo $this->channel['description'] ?></description>
<pubDate></pubDate>
<generator>http://domain.ru/</generator>
<language>en</language>
<wp:wxr_version>1.0</wp:wxr_version>
<wp:base_site_url>http://<?php echo $this->channel['url'] ?></wp:base_site_url>
<wp:base_blog_url>http://<?php echo $this->channel['url'] ?></wp:base_blog_url>
<?php foreach ($this->categories as $category) { ?>
<wp:category>
<wp:category_nicename><?php echo urlencode($category['name']) ?></wp:category_nicename>
<wp:category_parent></wp:category_parent>
<wp:cat_name><![CDATA[<?php echo $category['name'] ?>]]></wp:cat_name>
</wp:category>
<?php } ?>
<?php foreach ($this->publishes as $publish) { ?>
<item>
<title><?php echo $publish['title'] ?></title>
<link></link>
<pubDate><?php echo $publish['pubDate'] ?></pubDate>
<dc:creator>admin</dc:creator>
<?php foreach ($publish['categories'] as $category) { ?>
<category><![CDATA[<?php echo $category['name'] ?>]]></category>
<?php } ?>
<description></description>
<content:encoded><![CDATA[<?php echo $publish['text'] ?>]]></content:encoded>
<wp:post_id><?php echo $publish['pid'] ?></wp:post_id>
<wp:post_date><?php echo date('Y-m-d H:i:s', $publish['time']) ?></wp:post_date>
<wp:post_date_gmt><?php echo date('Y-m-d H:i:s', $publish['time']) ?><</wp:post_date_gmt>
<wp:comment_status>open</wp:comment_status>
<wp:ping_status>open</wp:ping_status>
<wp:post_name><![CDATA[<?php echo urlencode($publish['title']) ?>]]></wp:post_name>
<wp:status>publish</wp:status>
<wp:post_parent>0</wp:post_parent>
<wp:post_type>post</wp:post_type>
<wp:comment></wp:comment>
</item>
<?php } ?>
</channel>
</rss>
Вечное лето - вечным врагам (с) Сантим

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий