I created a custom taxonomy and a custom post type with MB Custom Table. This is the code I'm using for the relationship between the taxonomy and the post:
array( 'id' => 'id_tipo_inmueble', 'name' => 'Tipo de inmueble *', 'type' => 'taxonomy_advanced', 'taxonomy' => 'tipo_inmueble', 'field_type' => 'select', 'required' => true, ),
All is working fine, but the term count doesn't increment, so when I made a query with WP_Query_Term without setting hide_empty to false, the result is empty. I don't want to set hide_empty to false because I'm using that query to show a filter, and I don't want to show options without posts associated with that term.
The expected behavior is that every time I create a post with a term, the related term count increment in one.