Yes, the Repeater field type has no specific output method yet since it can be used for many different use-cases and it’s array may require different output format. That’s why this field type is not available for selection yet as the attribute type in Listings/Attributes.
If you’re familiar with coding, please try to create a custom template part instead, or you can insert a custom block to the listing template (with the custom content), get the Repeater value there (e.g. $listing->get_repeater_date_time()), iterate over it and output each array item in the required format.
Where can I find the template parts for page primary and block ternary?
I have followed the instruction in the Customizing Templates video to copy the part and modify it. I can see in the video that there is a listing_attributes_primary.php file and a listing_attributes_secondary.php file available under listing>view>block. However, they don’t exist in my installation under wp-content/plugins/hivepress/templates/listing/view/block and they are not available in the hivepress/templates at master · hivepress/hivepress · GitHub either.
How can I add content to the listing_attributes_primary section of the page using the hivepress/v1/templates/listing_view_page/ hook?
I am referencing the Github code to Add vendor email link to the listing page. The code adds the link in the listing_actions_primary section. I have modified it to display the repeater value in the listing_attributes_primary section and although the logs show that repeater values are being correctly retrieved and formatted, the values are not displayed on the page. I am able to inject the values in the listing_details_primary and listing_attributes_secondary, but not in listing_attributes_primary or listing_attributes_ternary. Below is a simple code that I used for testing:
Please try using one of the samples here Search · user:hivepress template · GitHub and start with it, if you choose a container block and use it’s array key you can insert any custom content into it.
How can I include the repeater Start Date and Time fields in the filter form?
I’ve already added a Start Date and Time field as an attribute, and it appears correctly in the filter form. However, I also have additional Start Date and Time fields within a repeater that are coded (see above). I would like these repeater fields to be included in the filter so that if an event has multiple dates and times, filtering by a date range that includes any of those dates will display the event.
Unfortunately there’s no simple way to do this because the Repeater saves its rows with fields as a single serialized array, within a single field, and search queries based on such arrays are not possible or too complex (editing or inserting raw SQL would be needed). We solve this in the Opening Hours extension by adding a callback for the listing update action, and save multiple post meta fields based on the repeater fields (from/to times per day of the week), for example “monday_from”, “monday_to” for the first row, and so on. Then the “Open Now” filter we add to the search form has a function which checks which day of the week is it and (if it’s Monday for example) searches listings based on the “current_time>monday_from and current_time<monday_to” condition in the meta_query of the search results WP_Query.