Timeline for use mysql to replace one custom field value with another custom field value
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 6, 2018 at 11:27 | vote | accept | Philip | ||
Jan 6, 2018 at 11:23 | comment | added | Philip | In the end i used WebElaine's approach with update_post_meta Here is the code i used: $args = array( 'meta_query' => array(array('key' => 'tnid_01old',))); $cpt_query = new WP_Query($args); if ($cpt_query->have_posts()) : while ($cpt_query->have_posts()) : $cpt_query->the_post(); $tnid = get_post_meta($post->ID, 'tnid_01old', true); update_post_meta( $post->ID, 'tnid_01', $tnid ); endwhile; endif; | |
Jan 5, 2018 at 7:04 | answer | added | Gary D | timeline score: 0 | |
Jan 4, 2018 at 17:05 | answer | added | WebElaine | timeline score: 0 | |
Jan 4, 2018 at 14:45 | review | Close votes | |||
Jan 19, 2018 at 3:01 | |||||
Jan 4, 2018 at 11:12 | history | asked | Philip | CC BY-SA 3.0 |