SQL error with custom query

Should be: $where .= ” AND voted > 1″; Other notes: instead of hardcoding table names you should use $wpdb->prefix . ‘post_votes’; instead of checking in global $_GET you should declare your filters as accepting two arguments and code functions accordingly, these filters pass as second argument object that contains all of query data. Like: … Read more

Removal of all posts content in bulk, keeping the posts itself

Do not run this on a live site until you’re tested it on a backup or local installation and confirmed valid results, i won’t take any resposibility for lost data, should that occur. SQL Query To run from PhpMyAdmin UPDATE wp_posts SET post_content=”your_content” WHERE post_type=”post” Inside WordPress To use inside a plugin or your functions … Read more