Custom WP_Term_Query returns empty results
-
The linked page has 3 relevant types to work with:
– Floor Plan (custom post type)
– Floor Plan Group (custom taxonomy used to group multiple floor plans together)
– Floor Plan Type (custom taxonomy used for the tabs in each floor plan group)Was working as expected, and not sure how it went wrong, but suddenly when the Floor Plan Group taxonomy ordering is enabled, I get no terms no matter what approach I use for querying them. The following return an empty:
// trying with get_terms $floor_plan_groups = get_terms(['taxonomy' => 'floor_plan_group', 'hide_empty' => false]); // trying with WP_Term_Query (new WP_Term_Query(['taxonomy' => 'floor_plan_type']))->get_terms();
After flipping the toggle in the plugin settings to turn off “Floor Plan Group” ordering, I get all my terms as expected from both of the above snippets.
The page I need help with: [log in to see the link]
- The topic ‘Custom WP_Term_Query returns empty results’ is closed to new replies.