
MrBrian
By: a guest on
Oct 10th, 2008 | syntax:
PHP | size: 0.39 KB | hits: 477 | expires: Never
//For Donncha's Sitewide Tags plugin: Populate tags blog with all posts made before the plugin was added
$posts = $wpdb->get_col( "SELECT ID FROM $wpdb->posts WHERE post_status = 'publish'" );
foreach ( $posts as $post ) {
$post_id = $post['ID'];
if($post_id != 1 && $post_id != 2)
sitewide_tags_post($post_id, get_post($post_id));
}
}