Retrieve Home Report Attachment IDs
-
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()
andget_brochure_attachment_ids()
, return arrays of attachment IDs that work well with WordPress functions likewp_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 IDsget_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!
- You must be logged in to reply to this topic.