UPDATE on SELECT results. A SQL query to swap Author with Meta Box value

I always find it way less confusing to get the results from one table and loop them rather than to try to join them like that… eg. global $wpdb; $query = “SELECT post_id FROM wp_postmeta WHERE meta_key=’fake_author’ AND meta_value=”11111″”; $results = $wpdb->get_results($query); foreach ($results as $result) { $query = “UPDATE wp_posts SET post_author=”222222″ WHERE ID='”.$result->post_id.”‘”; … Read more

Add & store extra fields – WordPress Comments

Turns out Advanced Custom Fields, a plugin I was already using, makes it super easy to insert additional fields into the comment form. ACF is so good that it has created a tutorial to do just this and how to output the data within the comment thread: https://www.advancedcustomfields.com/resources/get-values-comment/ However, by doing this the plugin adds … Read more