Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Colas Nahaboo

By: a guest on Nov 6th, 2008  |  syntax: PHP  |  size: 0.37 KB  |  hits: 865  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. // For Donncha's Sitewide Tags plugin: Populate tags blog with all posts made before the plugin was added
  2. // Working version
  3. $posts = $wpdb->get_col( "SELECT ID FROM $wpdb->posts WHERE post_status = 'publish'" );
  4. if ( !empty($posts) ) {
  5.     foreach ( $posts as $post ) {
  6.         if($post != 1 && $post != 2)
  7.             sitewide_tags_post($post, get_post($post));
  8.     }
  9. }