Skip to content

Instantly share code, notes, and snippets.

@michael-sumner
Last active June 11, 2024 09:47
Show Gist options
  • Save michael-sumner/b9deb7510b01a78bc03aa4ada5d1c523 to your computer and use it in GitHub Desktop.
Save michael-sumner/b9deb7510b01a78bc03aa4ada5d1c523 to your computer and use it in GitHub Desktop.
Loop through all posts and re-save them, which helps trigger the save_post hook. Example post type: "resource" is used. `--no-store` helps prevent an empty required value.
wp post update $(wp post list --post_type=resource --field=ID) --nostore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment