Make catagory wordpress sort by group.
Array
(
[0] => WP_Term Object
(
[term_id] => 199
[name] => 170
[term_group] => 2
)
[1] => WP_Term Object
(
[term_id] => 410
[name] => 80s
[term_group] => 2
)
[2] => WP_Term Object
(
[term_id] => 66
[name] => 8BIT
[term_group] => 0
)
[3] => WP_Term Object
(
[term_id] => 411
[name] => adventure
[term_group] => 0
)
//... more then 100+
i focus term_group have create 12 group. 1 to 12
is not a group when use
$tags = get_tags(); //array above
foreach ($tags as $tag) {
if ($tag->term_group==1) {
echo "group 1";
echo $tag->name;
}
if ($tag->term_group==2) {
echo "group 2";
echo $tag->name;
}
// .... until group 12
}
this array can output like
group 1 xxx aaa bbb
group 2 170 80s
group 3 ....