SHARE
TWEET

Colas Nahaboo

a guest Nov 6th, 2008 881 Never
  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. }
RAW Paste Data
Top