Show custom attributes as subcategories in the homepage search and map existing listings

Hi, I’m using HivePress with WordPress and I have a custom attribute called “Sottocategoria” (Subcategory), linked to the main category “Mercatino”.
The same applies to other main categories like “Immobili” and “Veicoli”, with attributes like “Sottocategoria Immobili” and “Sottocategoria Auto-Moto”.

I would like to:

  1. Display the attribute values (e.g., “Arredamento”, “Telefonia”, etc.) as real subcategories under the main category in the homepage category select field
  2. Automatically assign these attribute values as real WP categories to existing listings, without losing the original attribute data

In short, I want to avoid manually reassigning all listings and instead sync/mirror the attribute values with real subcategories that show up in the homepage search.

Is there a recommended way or filter to:

  • Get the attribute value for a listing and map it to a real subcategory?
  • Include these subcategories in the homepage category dropdown?

Thank you very much in advance!

Hi,

Unfortunately, there’s no easy way to use custom attribute options as subcategories. While it’s easy to replace the displayed radio buttons via the hivepress/v1/forms/listing_filter hook, applying the same search logic and other category-specific logic would require advanced customizations.

Please let me know if there’s a specific reason for not using subcategories directly, maybe there’s a workaround.