I am trying to: simply update some fields but the guid field is not updating using cred_save_data function
$my_upost = array(
'ID' => $etid,
'guid' => '<em><u>hidden link</u></em>'.$etid,
'post_content' => 'medarbejder er nu opdateret' .$post_id.' og post ID er: '.$etid
//'post_parent' => $post->ID
);
wp_update_post($my_upost);
any idea why the guid field from within cred_save_data not get updated?
Link to a page where the issue can be seen:
password protected user
I expected to see: in mysql database the post table and guid field updated
Instead, I got: the guid field is not updated all other fields are
Solved by
1: Overall issue:
The general save_post action must be used with a priority of at least 30 when used in conjunction with post types registered with Types, or inconsistencies in the updated data may be experienced.
My issue is resolved now. Thank you!
2:
$columns = array(
'ID' => $etid,
'guid' => '<em><u>hidden link</u></em>'.$etid,
'post_content' => 'medarbejder er nu opdateret' .$post_id.' og post ID er: '.$etid
//'post_parent' => $post->ID
);
$wpdb->update( $wpdb->posts, $columns, array( 'ID' => $etid ) );