• Resolved Tim Sutherland

    (@681admin)


    Hi all

    Client would like to show all the contact details for an agent on a single property page rather than making users click on the agents name to view all their contact details.

    I know you can show the preferred contact, but only 1. Is it possible to have multiple preferred contacts (i.e. email and phone) or to simply show all the contacts for the agent as per on the agent details page?

    I’ve looked through the templates and know that /templates/front/agent/content-archive-info.php is the one that needs to be modified but cannot figure out how to simply get the values of the contact fields (custom post type with custom fields usually just use get post meta but these don’t appear to be stored in post meta).

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Estatik

    (@estatik)

    Hi Tim,
    To display additional agent information on the property page, you’ll need to override the content-archive.php template. You can retrieve the data using the plugin’s built-in functions, for example: $agent = es_get_agent( get_the_ID() ); $agent->user_email; $agent->contacts; and other similar fields

    Thread Starter Tim Sutherland

    (@681admin)

    Thank you. Is there somewhere that you have the plugins built-in functions documented? I simply want to show the email address and mobile phone number in addition to everything else that is being displayed already.

    According to your own documentation and following the trail I thought it was the /templates/front/agent/content-archive-info.php that I should be overriding. You mention content-archive.php – is that just a typo or are you referring to a different file (i.e. am I looking in the wrong place)?

    $agent->contacts as I know it gets an array of all the contact numbers?

    Thread Starter Tim Sutherland

    (@681admin)

    Figured it out. Thanks for the step in the right direction.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.