Skip to content

Instantly share code, notes, and snippets.

@propertyhive
Last active January 19, 2026 11:58
Show Gist options
  • Select an option

  • Save propertyhive/7efab68d409c0269833f400f1c871fa8 to your computer and use it in GitHub Desktop.

Select an option

Save propertyhive/7efab68d409c0269833f400f1c871fa8 to your computer and use it in GitHub Desktop.
Don't update title on subsequent updates
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