Hi HivePress Support,
I’m working on adding structured data (Schema.org) to my listings and need help retrieving the Pets Allowed field correctly.
Currently, I’m using $listing->get_pets(), but it returns an empty value. I’ve also tried:
$listing->get_field('pets')get_post_meta($listing->get_id(), 'pets', true)
None of these methods retrieve the selected option from the Pets Allowed attribute in HivePress.
Here’s how my Pets Allowed field is set up:
- Field Type: Single Select
- Options:
Allowed,Cats Only,Dogs Only,Not Allowed
Can you confirm the correct method to retrieve this attribute in HivePress?
Kind regards,
Jovica