Last active
January 19, 2026 11:58
-
-
Save propertyhive/7efab68d409c0269833f400f1c871fa8 to your computer and use it in GitHub Desktop.
Don't update title on subsequent updates
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_xml_mapped_field_value', 'only_title_on_first_import', 10, 5 ); | |
| function only_title_on_first_import($content, $property, $field, $import_id, $post_id = '') | |
| { | |
| if ( $field != 'post_title' ) | |
| { | |
| return $content; | |
| } | |
| if ( empty($post_id)) | |
| { | |
| return $content; | |
| } | |
| $post = get_post( $post_id ); | |
| return $post->post_title; | |
| } | |
| add_filter( 'houzez_property_feed_xml_mapped_field_value', 'only_content_on_first_import', 10, 5 ); | |
| function only_content_on_first_import($content, $property, $field, $import_id, $post_id = '') | |
| { | |
| if ( $field != 'post_content' ) | |
| { | |
| return $content; | |
| } | |
| if ( empty($post_id)) | |
| { | |
| return $content; | |
| } | |
| $post = get_post( $post_id ); | |
| return $post->post_content; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment