Advertisement
Guest User

MrBrian

a guest
Oct 10th, 2008
608
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.39 KB | None | 0 0
  1. //For Donncha's Sitewide Tags plugin: Populate tags blog with all posts made before the plugin was added
  2. $posts = $wpdb->get_col( "SELECT ID FROM $wpdb->posts WHERE post_status = 'publish'" );
  3. if ( !empty($posts) ) {
  4.     foreach ( $posts as $post ) {
  5.         $post_id = $post['ID'];
  6.         if($post_id != 1 && $post_id != 2)
  7.             sitewide_tags_post($post_id, get_post($post_id));
  8.     }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement