I would like to generate a number of posts and attach the same featured image to all posts.

wp post generate --count=20
wp post meta add <id> _thumbnail_id 215

But how can I run this two commands together? How can I retrieve the id of created post?

1 Answer
1

As I mentioned on the Github issue, your request isn’t currently possible with WP-CLI but would be a nice future enhancement.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *