• Hi,

    I’m working with the Home Reports addon and referring to the documentation: Displaying Home Reports.

    When a home report is uploaded to a property record, a link to the uploaded file is shown by default in the list of actions on the property details template. However, I would like to create a custom button for this.

    I’m struggling to find a method to retrieve the attachment IDs for a “Home Report”, similar to the methods available for floorplans and brochures. These methods, such as get_floorplan_attachment_ids() and get_brochure_attachment_ids(), return arrays of attachment IDs that work well with WordPress functions like wp_get_attachment_url() to get the attachment URL.

    Here are the methods I have for reference:

    • get_floorplan_attachment_ids() – Returns an array of floorplan attachment IDs
    • get_brochure_attachment_ids() – Returns an array of brochure attachment IDs

    I tried using the following code, but it appears that $property->get_home_report_attachment_ids() or similar variations do not exist:

    <?php
    $home_report_ids = $property->get_home_report_attachment_ids();
    ?>

    Would it be possible to do or have a helper method to retrieve the Home Report attachment IDs?

    Thanks in advance for your help!

Viewing 1 replies (of 1 total)
  • Thread Starter bkas24

    (@bkas24)

    Hi. Just wanted to add some additional context. I’m looking to retrieve the Home Report attachment IDs for use in a custom function.

    PS. > I’ve noticed that using the Template Assistant Additional Field widget on Elementor allows the use of the Home Report Link as a field. However, I’ve encountered an issue where the Home Report Link does not produce any output when using the Additional Field widget. In fact, there is no output at all. Despite this, the Home Report Link appears and functions correctly when used in the ‘Actions’ widget per default. I thought I would report this to you.

    Nevertheless, Is it possible to create a helper method to retrieve the Home Report attachment IDs? I’d like to incorporate this into as part of a separate function I’m developing.

    Thanks for your help!

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