New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot add block content via the --post_content
flag
#490
Comments
This seems to be the issue with shell rather than WP CLI. Even wp post create --post_title="Pizza Day" --post_status=publish --post_content="<\!-- wp:paragraph --><p>PIZZA FRIDAY</p><\!-- /wp:paragraph -->" |
I just tested your command in the CLI and it runs without error, however the content created is still not a block but the classic content. The escaped comment is still considered a string. Found [this issue] which suggests importing escaped content via HTML file. don't know if I'll be able to do that in the blueprint.json, but I will try to test. |
Let's continue the conversation in wp-cli/wp-cli#5923 (comment) |
Bug Report
Describe the current, buggy behavior
Cannot add block content via the
--post_content
flag.Describe how other contributors can replicate this bug
Try to create a post with block content
See error that the event is not found.
However
inserts a post, though with "classic editor" content that then needs to be converted to blocks.
Hopefully this is just bad formatting on my part? In which case, we can switch this to a documentation request?
Describe what you would expect as the correct outcome
post inserted with block content ready for use in the block editor
Let us know what environment you are running this on
The text was updated successfully, but these errors were encountered: