【问题标题】:wordpress custom fields then import RSS Feedwordpress 自定义字段然后导入 RSS Feed
【发布时间】:2016-08-30 10:35:04
【问题描述】:

我想在我的 Wordpress 博客中导入带有 RSS Feed 2.0 的新帖子。我为 wordpress 导入生成了标准 XML 文件,并添加了一些自定义字段:缩略图、视频和持续时间。 这里的例子:

<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/">
<title>Title</title>
<link>Somelink</link>
<language>en</language>
<channel>
<item>
     <title>Title</title>
     <pubDate>Mon, 29 Aug 2016 04:24:00 +0000</pubDate>
     <description>description</description>
     <content:encoded><![CDATA[some text]>content:encoded>

    <Category>category 1</Category>
    <Category>category 2</Category>

    <wp:postmeta>
    <wp:meta_key>duration</wp:meta_key>
    <wp:meta_value><![CDATA[25:44]]></wp:meta_value>
    </wp:postmeta>

    <wp:postmeta>
        <wp:meta_key><![CDATA[videoswiper-embed-thumb]]></wp:meta_key>
        <wp:meta_value><![CDATA[http://example.com/thumb.jpg]]>     </wp:meta_value>
    </wp:postmeta>
    <wp:postmeta>
           <wp:meta_key><![CDATA[videoswiper-embed-code]]></wp:meta_key>
           <wp:meta_value><![CDATA[<embed type="application/x-shockwave-flash" src="[http://example.com/video.mp4"/>]]></wp:meta_value>
    </wp:postmeta>
</item>
</channel>
</rss>

我已成功创建帖子,但自定义类型值为空。 除了以上。我使用了一个自定义主题,其中这三个字段已经存在(默认为空)。

我做错了什么?

【问题讨论】:

    标签: xml wordpress import custom-fields rss2


    【解决方案1】:
    <content:encoded><![CDATA[some text]>content:encoded>
    

    <content:encoded><![CDATA[some text]]></content:encoded>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-05
      • 2011-11-09
      • 1970-01-01
      • 1970-01-01
      • 2014-06-23
      相关资源
      最近更新 更多