Skip to content

Instantly share code, notes, and snippets.

@propertyhive
Created September 8, 2021 07:35
Show Gist options
  • Save propertyhive/3e576ccae3412fa2b5ba21e10c879614 to your computer and use it in GitHub Desktop.
Save propertyhive/3e576ccae3412fa2b5ba21e10c879614 to your computer and use it in GitHub Desktop.
Customise Map HTML
add_filter( 'propertyhive_map_infowindow_html', 'change_map_link_target' );
function change_map_link_target( $html )
{
$html = "<div class=\"property\"><div class=\"image\"><a href=\"' + property.link + '\" target=\"_parent\"><img src=\"' + property.image + '\" alt=\"' + property.address + '\"></a></div><div class=\"details\"><div class=\"address\"><a href=\"' + property.link + '\" target=\"_parent\">' + property.address + '</a></div><div class=\"price\">' + property.price + ' <span class=\"price-qualifier\">' + property.price_qualifier + '</span></div><div class=\"summary\">' + summary_html + '</div></div><div style=\"clear:both\"></div></div>";
return $html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment