Skip to content

Instantly share code, notes, and snippets.

@propertyhive
Created October 1, 2025 05:18
Show Gist options
  • Save propertyhive/047708908fbd929315b3290fc1ee5443 to your computer and use it in GitHub Desktop.
Save propertyhive/047708908fbd929315b3290fc1ee5443 to your computer and use it in GitHub Desktop.
add_filter( 'houzez_property_feed_update_postarr', 'retain_existing_data', 10, 4 );
function retain_existing_data( $my_post, $property, $import_id, $post_id ) {
// Get the existing post object
$existing_post = get_post( $post_id );
if ( $existing_post ) {
// Preserve existing values
$my_post['post_title'] = $existing_post->post_title;
$my_post['post_excerpt'] = $existing_post->post_excerpt;
$my_post['post_content'] = $existing_post->post_content;
}
return $my_post;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment