Posted by Colas Nahaboo on Thu 6 Nov 16:37 (modification of post by MrBrian view diff)
report abuse | download | new post
- // For Donncha's Sitewide Tags plugin: Populate tags blog with all posts made before the plugin was added
- // Working version
- $posts = $wpdb->get_col( "SELECT ID FROM $wpdb->posts WHERE post_status = 'publish'" );
- foreach ( $posts as $post ) {
- if($post != 1 && $post != 2)
- sitewide_tags_post($post, get_post($post));
- }
- }
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.