Skip to content

Instantly share code, notes, and snippets.

@NicktheGeek
Created January 10, 2013 20:27
Show Gist options
  • Save NicktheGeek/4505493 to your computer and use it in GitHub Desktop.
Save NicktheGeek/4505493 to your computer and use it in GitHub Desktop.
Change AgentPress feature listing widget output
<?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