Create Posts using Import>RSS/WXR/XML and passing Values to Custom Fields
-
My problem is simple. I need to make a lot of posts containing image url’s for a “photo gallery” page. I’ve read up a lot on creating posts from RSS feeds and imports. I’ve been successful at creating posts but can not somehow pass a value into a custom type. The gallery needs two url’s, one for the image thumbnail and one for the full size. The code I’m using looks like this;
<?xml version="1.0" encoding="UTF-8" ?> <!-- generator="WordPress/3.2.1" created="2011-11-14 01:56" --> <rss version="2.0" xmlns:excerpt="https://www.ads-software.com/export/1.1/excerpt/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:wp="https://www.ads-software.com/export/1.1/"> <item> <title>Pavers 1</title> <description></description> <Category>Flooring</Category> <Category>Pavers</Category> <wp:postmeta> <wp:meta_key>port_large_image_url</wp:meta_key> <wp:meta_value>images/portfolio/architectural.elements/Staircases.004.jpg</wp:meta_value> </wp:postmeta> </item> <item> <title>Swimming Pools 1</title> <description></description> <Category>Flooring</Category> <Category>Swimming Pools</Category> <wp:postmeta> <wp:meta_key>port_large_image_url</wp:meta_key> <wp:meta_value>images/portfolio/architectural.elements/Staircases.004.jpg</wp:meta_value> </wp:postmeta> </item> </channel> </rss>
I think I’m going in the right direction with this and would greatly appreciate the ability to create these posts this way. I have almost 1000 images I need to add to an individual post complete with descriptions and categories. If I were able to “batch” them then I’d save myself a lot of time and remove the high probability of human error.
I’d really be grateful to any help or a steer in the right direction.
- The topic ‘Create Posts using Import>RSS/WXR/XML and passing Values to Custom Fields’ is closed to new replies.