Created
March 10, 2018 18:28
-
-
Save alexsancho/045b3cfedf4c6f32874e47ec2fa50499 to your computer and use it in GitHub Desktop.
post.php
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
$posts_ids = get_posts('post_type=post&posts_per_page=-1&fields=ids'); | |
// $posts_ids is now an array of IDs | |
foreach( $posts_ids as $post_id ) { | |
save_index( $post_id ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment