mirror of
https://ghproxy.net/https://github.com/JayWood/jw-wpcli-random-posts.git
synced 2025-11-19 15:17:14 +08:00
5
Home
JayWood edited this page 2017-02-24 14:11:05 -05:00
Admittedly I suck at documentation, but I do my best. Below is a list of the options for post generation. If you feel I've not completely covered everything, feel free to create a PR.
wp jw-random posts
--type=<post_type> - Default: post
Determines the post type of the generated posts.
--post_status=<post_status> - Default: publish The status you want the inserted posts set to.
--n=<post_count> - Default: 1
How many posts you want to generate
--author=<id> - Default: 1
Sets the author ID of the posts, defaults to the site admin ( typically ID 1 ).
--tax=<taxonomy_slug>
What taxonomies to generate terms for, if not set, no terms will be created.
Taxonomy slugs can be separated by commas if you need more than one.
--tax-n=<term_count> - Default 3
How many terms to generate per taxonomy slug.
--featured-image
If this is set, featured images will be set for the posts.
--image-size=<width,height> - Default: 1024,768
Determines the image size from lorempixel.com when downloading. It's typically a good idea to set this large enough so your image resizing can handle it without squishing or stretching.
--img-type=<provider_slug> - Default: random
Sets the image category from lorempixel.com, the following options are available:
--site=<site_id>
IF this is set, and the site is multi-site enabled. A switch to blog occurs to this blog ID so posts are imported to this ID.
Deleting the wiki page "Home" cannot be undone. Continue?
专为开源 Web 生态打造的企业级代码托管平台,深度支持 WordPress、Laravel、Vue.js、React 等主流技术栈,致力于推动中国开放网络 OpenWeb 发展,助力本土开源项目建设。