Outputting agent details on a property

This guide is only applicable to users with the Property Portal add on enabled.

For regular details on how to output negotiator or office details please see the shortcodes available.

When a property is assigned to an agent/branch it's likely that you'll want to display the logo, name and contact details of the agent in question on search results or the property details page.

There are a number of properties/methods available. As long as you have the $property global variable available in your template or action you should have access to all of the agent information you need.

You can see below an example of how we might get various bits of information:

$property_agent_branch = new PH_Property_Agent_Branch($property);
var_dump($property_agent_branch->agent->post_title);
var_dump($property_agent_branch->agent->get_logo_src());
var_dump($property_agent_branch->agent_branch->get_formatted_full_address());
var_dump($property_agent_branch->get_agent_branch_telephone_number());
var_dump($property_agent_branch->get_agent_branch_email_address());