Generate the post title from ACF fields

The $post_id value get in save_post hook might be revision ID. So to retrieve real post ID, you can use this function wp_is_post_revision() Try to change your code as follows, function set_post_title_from_acf($post_id) { // If this is a revision, get real post ID if ( $parent_id = wp_is_post_revision( $post_id ) ) $post_id = $parent_id; $my_post …

Read more

CPT – Can’t delete Draft posts

I managed to fix it. First I tried to disable plugins but that did not help. The issue was found in functions.php. It had a function inside that does not allow an article to be published unless it has a featured image. When I commented it out and tried deleting the articles, it started working …

Read more