(WordPress eXtended RSS)
WordPress exporterar till en XML-fil som Àr:
- RSS 2.0
- Utökad med WordPress-specifika namnrymder
<rss version="2.0"
xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/"
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.2/"
>
<rss>
<channel>
<title>Webbplatsens namn</title>
<link>https://example.com</link>
<wp:wxr_version>1.2</wp:wxr_version>
<!-- Users -->
<wp:author>...</wp:author>
<!-- Taxonomies -->
<wp:category>...</wp:category>
<wp:tag>...</wp:tag>
<!-- Content -->
<item>...</item>
<item>...</item>
</channel>
</rss>
<rss>
<channel>
<title>Webbplatsens namn</title>
<link>https://example.com</link>
<wp:wxr_version>1.2</wp:wxr_version>
<!-- Users -->
<wp:author>...</wp:author>
<!-- Taxonomies -->
<wp:category>...</wp:category>
<wp:tag>...</wp:tag>
<!-- Content -->
<item>...</item>
<item>...</item>
</channel>
</rss>
đ Struktur för ett inlĂ€gg (<item>)
Varje inlÀgg, sida, CPT, media = ett <item>
Minimal kÀrnstruktur
<item>
<title>InlÀggets titel</title>
<link>https://example.com/post-slug</link>
<pubDate>Mon, 01 Jan 2024 12:00:00 +0000</pubDate>
<dc:creator><![CDATA[admin]]></dc:creator>
<guid isPermaLink="false">https://example.com/?p=123</guid>
<description></description>
<content:encoded><![CDATA[
<p>Hela innehÄllet i HTML</p>
]]></content:encoded>
</item>
đ§ WordPress-specifika fĂ€lt (viktiga för integration)
<wp:post_id>123</wp:post_id>
<wp:post_date>2024-01-01 12:00:00</wp:post_date>
<wp:post_date_gmt>2024-01-01 11:00:00</wp:post_date_gmt>
<wp:post_modified>2024-01-02 08:00:00</wp:post_modified>
<wp:post_modified_gmt>2024-01-02 07:00:00</wp:post_modified_gmt>
<wp:post_type>post</wp:post_type> <!-- page, attachment, CPT -->
<wp:post_status>publish</wp:post_status>
<wp:post_name>slug</wp:post_name>
<wp:status>publish</wp:status>
<wp:comment_status>open</wp:comment_status>
<wp:ping_status>open</wp:ping_status>
đ§© Taxonomier (kategorier, taggar, custom)
<category domain="category" nicename="ekologi">
<![CDATA[Ekologi]]>
</category>
<category domain="post_tag" nicename="hÄllbarhet">
<![CDATA[hÄllbarhet]]>
</category>
<category domain="custom_taxonomy" nicename="nod-1">
<![CDATA[Nod 1]]>
</category>
âĄÂ domain = taxonomy
âĄÂ nicename = slug
đ§Ÿ Metadata (custom fields, ACF, systemdata)
All metadata ligger som nyckelâvĂ€rde-par
<wp:postmeta>
<wp:meta_key>_thumbnail_id</wp:meta_key>
<wp:meta_value>456</wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key>field_65a123abc</wp:meta_key>
<wp:meta_value><![CDATA[Some value]]></wp:meta_value>
</wp:postmeta>
đŒ Media (attachments)
Media Àr ocksÄ <item>:
<item>
<title>bild.jpg</title>
<wp:post_type>attachment</wp:post_type>
<wp:attachment_url>
https://example.com/wp-content/uploads/2024/01/bild.jpg
</wp:attachment_url>
</item>
Relationer:
- InlÀgg refererar till media via meta (
_thumbnail_id) - ID-baserat, inte URL-baserat