A Symfony Console Command that create a command to generate Gutenberg Block formatted code based import XML file.
git clone [email protected]:thinktandem/convert-posts-gutenberg.git
cd convert-posts-gutenberg
composer install
bin/console generate:xml FILE_PATH
- Download WordPress All Export Plugin
- Export your posts as a XML, but do the following:
- In the content field select "Export the value returned by a PHP function"
- Put transform in the first vox that has
- Use this function in the function box:
<?php
function transform($value) {
return wpautop($value);
}
?>
- Save the function.
The file path is required. It will error out without it.
The final XML is generated within the output folder in this app.