Skip to content

Instantly share code, notes, and snippets.

@propertyhive
Created February 17, 2026 19:58
Show Gist options
  • Select an option

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

Select an option

Save propertyhive/7b15fa07c6a696be84089a6930911c2d to your computer and use it in GitHub Desktop.
add_filter( 'houzez_property_feed_insert_postarr', 'draft_on_insert', 10, 3 );
function draft_on_insert( $data, $property, $import_id )
{
$data['post_status'] = 'draft';
return $data;
}
add_filter( 'houzez_property_feed_update_postarr', 'keep_title_content_and_status', 10, 4 );
function keep_title_content_and_status($data, $property, $import_id, $post_id)
{
if ( empty($post_id))
{
return $data;
}
$post = get_post( $post_id );
$data['post_title'] = $post->post_title;
$data['post_content'] = $post->post_content;
$data['post_status'] = $post->post_status;
return $data;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment