Last active
October 31, 2022 22:15
-
-
Save fernandovbs/e8595e3724c6ed38b800eea49a1f290d to your computer and use it in GitHub Desktop.
Update post type for post from specific category
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Update post type for posts from category | |
wp post list --category_name=artigos --field=ID | xargs wp post update --post_type=blog | |
#Count number of posts from all post types (except posts with other status like inherit) | |
wp post list --post_type=$(wp post-type list --field=name --format=json) --post_status=publish,trash,draft --format=count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment