Advertisement
Guest User

Colas Nahaboo

a guest
Nov 6th, 2008
1,207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.37 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement