diff --git a/idx/idx-pages.php b/idx/idx-pages.php index 2d42c60f1..0890c9d45 100755 --- a/idx/idx-pages.php +++ b/idx/idx-pages.php @@ -325,9 +325,9 @@ public function find_and_update_post( $link, $name, $posts ) { $matchingPostWithName = null; foreach ( $matchingPosts as $matchingPost ) { // It's possible for a post to already have the expected post name (slug), if we find one with this characteristic it should be kept over others - $nameMatches = $matchingPost->name == $link->url; + $nameMatches = $matchingPost->post_name == $link->url; if ($nameMatches) { - error_log("impress find_and_update_post found a matching post for $link, $name: " . $matchingPost->ID); + error_log("impress find_and_update_post found a matching post for $link->url, $name: " . $matchingPost->ID); $matchingPostWithName = $matchingPost; } }