Importing Posts to a new installation #396
-
Hi guys, How do you go about importing blog posts to a new installation. Usually you can use the Wordpress import/export tool, export some specific category and then import this in a new installation. However, since Flynt is component based, every post doesn't have any text area selected as standard, the only thing you can import is the title of the posts. Let's assume all of your posts are text based only. Is there any way to have the wysiwyg block component enabled temporarily as standard for posts? so you could import the content of the posts too? What would be way to import posts like that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey @Auroraboreali-s not sure if I understood you correctly: you have existing posts that used the standard Wordpress editor or Gutenberg and want to keep them on the new site, correct? I had a similar setup where a blog had 1000+ existing posts they wanted to keep (and are great for SEO of course) but they wanted to compose the new blog posts using Flynt components. Importing the posts Displaying the posts <section class="post-main">
{# Display the classic WP content field on older posts #}
{% if (post.date('U')) <= '2021-07-05'|date('U') %}
<div class="classic-wp-content container centerMaxWidthContainer">
<div class="content centerContentMaxWidth">
{{ post.content }}
</div>
</div>
{% endif %}
{# ACF Components #}
{% for component in post.meta('postComponents') %}
{{ renderComponent(component) }}
{% endfor %}
</section> I've a blog post is older than the given date it will render the normal wordpress content field for it. //remove_post_type_support('post', 'editor'); This will make the wordpress editor to show up again in the admin area. Hope that helps! |
Beta Was this translation helpful? Give feedback.
Hey @Auroraboreali-s
not sure if I understood you correctly: you have existing posts that used the standard Wordpress editor or Gutenberg and want to keep them on the new site, correct?
I had a similar setup where a blog had 1000+ existing posts they wanted to keep (and are great for SEO of course) but they wanted to compose the new blog posts using Flynt components.
Importing the posts
Importing the posts with the media was quite a hassle to be honest.
Easiest would be if you can start on a copy of the existing WP site and just enable Flynt as a new theme, then you don't need to import anything.
I've used the Export media with selected content plugin addon for the stanard WP export and e…