Created
January 10, 2013 20:27
-
-
Save NicktheGeek/4505493 to your computer and use it in GitHub Desktop.
Change AgentPress feature listing widget output
This file contains 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
<?php | |
add_filter( 'agentpress_featured_listings_widget_loop', 'child_featured_listings_widget_loop' ); | |
/** | |
* This code will replace the "," left behind in AgentPress feature listing widget after | |
* the listing detail IDs have been changed. | |
* Change the IDs to suit your needs. | |
*/ | |
function child_featured_listings_widget_loop( $loop ){ | |
$detail_one = genesis_get_custom_field( '_listing_detail_one' ); | |
$detail_two = genesis_get_custom_field( '_listing_detail_two' ); | |
$new_details = sprintf( '%s, %s', $detail_one, $detail_two ); | |
return str_replace( ',', $new_details, $loop ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment