Customizing user data

ACF is a very good option, it has specific options to create user fields. There are tons of tutorials and practical examples out there, just google it and you will find them. It is one of the most popular WP plugins, so don’t be afraid of compatibility problems, it’s well maintained. You can check its … Read more

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