Created
October 1, 2025 05:18
-
-
Save propertyhive/047708908fbd929315b3290fc1ee5443 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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