Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save facelordgists/0b735478d1526bf681d8d3432acfc981 to your computer and use it in GitHub Desktop.
Save facelordgists/0b735478d1526bf681d8d3432acfc981 to your computer and use it in GitHub Desktop.

Modified version of the code found in this post

{% set export = blog_recent_posts('2099729350', 200) %} 
"post_title","post_slug","post_date","post_content","post_thumbnail","post_author","post_category",<br>
{% for content in export %} "{{ $root.DOUBLE_LEFT_CURLY_BRACE }} content.name|forceescape }}","{{ $root.DOUBLE_LEFT_CURLY_BRACE }} content.slug|forceescape|replace('blog/', '') }}","{{ $root.DOUBLE_LEFT_CURLY_BRACE }} content.publish_date_localized|forceescape }}","{{ $root.DOUBLE_LEFT_CURLY_BRACE }} content.post_body|replace('"','""')|forceescape|escape_jinjava }}","{{ $root.DOUBLE_LEFT_CURLY_BRACE }} content.featured_image }}","{{ $root.DOUBLE_LEFT_CURLY_BRACE }} content.blog_post_author }}","{{ $root.DOUBLE_LEFT_CURLY_BRACE }} content.topic_list|forceescape|replace('[', '')|replace(']', '') }}" <br>
{% endfor %}
{% endif %}

Use this in tandem with the WP All Import plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment