
Listicles add another layer of complexity when it comes to importing content.
1. Prepare the Images
Before importing listicles, you must ensure that all of the necessary images are imported into RebelMouse. This is a mandatory step, since listicles will reference these images using the image_url
field, which is unique to RebelMouse's importer tool.
2. Insert a Listicle tag in Your Body Field
In your post's body field, you need to insert the following tags to indicate where the listicle will be displayed within a post:
<listicle></listicle>
Any text that exists before the <listicle>code</listicle>
opening tag will be considered a part of the body content, and any text after the closing tag will also be treated as part of the body content.
3. Define the Listicle Content
The normal schema of a listicle follows our API documentation located here.
But please note that when importing listicles, you should use the original image_url
instead of the media
shortcode or image_id
. This is because, at the moment of import, it's very unlikely that you will have access to the shortcode or image identifiers. To ensure that your listicle images are referenced correctly within RebelMouse, always use the image_url
provided.
This is an example of a post JSON object that contains listicles inserted into the post body:
<code>{ "headline": "This is an awesome post!", "body": "<p>foo</p><listicle></listicle><p>bar</p>", "listicle": { "items": [ { "headline": "Listicle 1", "body": "Here is some content", "image_url": "URL_of_the_referenced_image" } ], "settings": { "body_text_above": true, "layout_type": 1 } } }