WP terms doesn’t sort
-
Hello,
I am trying to get sorted terms filtered by custom term meta.
$parent_term_id = 60; $cat_args = array( 'parent' => $parent_term_id, 'orderby' => 'DATE', 'order' => 'ASC', 'meta_key' => 'created', 'meta_type' => 'DATE' ); $terms = get_terms('product_cat', $cat_args);
I got these terms filtered and it returns only with ‘created’ meta value. However, if I print term meta values (‘created’), I got
[“2021-12-20”][“2021-11-03”][“2022-05-03”][“2022-02-18”][“2021-11-26”][“2020-10-27”]
Which is not ordered by date. What is wrong in my query?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘WP terms doesn’t sort’ is closed to new replies.