The similar properties section code can be found in templates/ similar_listings.php

In there we read the category, action category and city of the current property and we create a custom wp_query request based on that data.

For example
if ($post_city_category!=''):
foreach ($post_city_category as $item) {
$items_city[] = $item->term_id;
'taxonomy' => 'property_city',
'field' => 'id',
'terms' => $items_city

This code reads the city from he current property and add it as a parameter in the similar properties query.

The actual query is made at line 87
$my_query = new WP_Query($args);

and the listings are displayed after that with the code

For custom property template, the changes need to be done in help_functions.php