Skip to content

Instantly share code, notes, and snippets.

@davebonds
Last active August 29, 2015 13:59
Show Gist options
  • Save davebonds/10460019 to your computer and use it in GitHub Desktop.
Save davebonds/10460019 to your computer and use it in GitHub Desktop.
snippet to show connected agents on single listings using WP Listings or AgentPress
add_action( 'genesis_after_post', 'aeprofiles_show_connected_agent' ); // XHTML
add_action( 'genesis_after_entry', 'aeprofiles_show_connected_agent' ); // HTML5
function aeprofiles_show_connected_agent() {
if (function_exists('_p2p_init') && function_exists('agentpress_listings_init') || function_exists('_p2p_init') && function_exists('wp_listings_init')) {
echo'
<div class="connected-agents">';
aeprofiles_connected_agents_markup();
echo '</div>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment