if you want to remove it completely from the db, here is the code i use/used
Code:
function remove_shortcode_from_db($shortcode = 'button') {
global $wpdb;
$posts = $wpdb->get_results("SELECT ID,post_title,post_content FROM $wpdb->posts");
$regex = '/\[(\[?)('.$shortcode.')\b([^\]\/]*(?:\/(?!\])[^\]\/]*)*?)(?:(\/)\]|\](?:([^\[]*+(?:\[(?!\/\2\])[^\[]*+)*+)\[\/\2\])?)(\]?)/s';
foreach($posts as $post) {
$final = preg_replace($regex,'',$post->post_content);
$change = $wpdb->update( $wpdb->posts, array('post_content' => $final), array('ID' => $post->ID));
}
}
Code:
remove_shortcode_from_db('downloads_box');
always backup your database before doing any mods like this.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.
my contact: fris at fris.net