Skip to content

Instantly share code, notes, and snippets.

@technovangelist
Last active January 2, 2016 00:19
Show Gist options
  • Save technovangelist/8222283 to your computer and use it in GitHub Desktop.
Save technovangelist/8222283 to your computer and use it in GitHub Desktop.
This is an example of how to override the html for a list of listings
function matt_listing_method($return,$raw,$html){
$location = $raw['location'];
$cur_data = $raw['cur_data'];
$uncur_data = $raw['uncur_data'];
?>
<div class="listing">
<span>Address: <?php echo $location['address'].', '.$location['locality'].', '.$location['region'].' '.$location['postal'] ?></span>
<a href="<?php echo $cur_data['url'] ?>">Click Here to View Property</a> |
<a href="https://maps.google.com/maps?q=<?php echo $location['full_address'] ?>&hl=en&z=15<br />">View on a map</a>
</div>
<?php
}
add_filter('pls_listing_home', 'matt_listing_method',10,3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment