Hi,
I’m stuck getting the image from the hp_listing_category. Here’s my snippet so far.
<?php
$args = [
'taxonomy' => 'hp_listing_category',
'hide_empty' => false,
];
$query = new WP_Term_Query($args);
$terms = $query->get_terms();
$listings = [];
foreach ($terms as &$term)
{
// Remove ones with no parents
if ($term->parent != 0) {
$listing = new \HivePress\Models\Listing(['id' => $term->term_id]);
$listings[] = $listing->get_image__url();
}
}
The $term->term_id is giving me nothing good. Thank you for any help.