@ Mitch
No it should be this, sorry.
$permalink = $wp_rewrite->using_permalinks() ? trailingslashit( get_permalink( $homeID ) ) : get_permalink($homeID);