Last active
January 2, 2016 00:19
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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