Closed tw2113 closed 8 years ago
Since the only other plugin doing that is broken atm, that would be an AWESOME addition. ;)
After some quick testing, I found that a WP_Query as simple as this would do the trick:
$args = array(
'post_type' => array( 'post' ),
'posts_per_page' => -1,
'cache_results' => false,
'update_post_meta_cache' => false,
);
$query = new WP_Query( $args ); var_dump($query);
foreach( $query->posts as $post ) {
wds_set_media_as_featured_image( $post->ID, $post );
}
'posts_per_page' => -1,
will overload and crash the server, considering sites with thousands of posts.
Would be easy enough to amend and utilize the offset parameter.
Closing in favor of #27
https://wordpress.org/support/topic/way-to-mass-update-existing-posts?replies=4