I am trying to figure out how to display the categories in a specific order. Let's say my category IDs are in the following order: 1,3,4,2,5
I want to display the categories in that sequence. Here is the following code I have so far but it isn't working:
$args = array(
'type' => 'post',
'child_of' => 0,
'parent' => '',
'orderby' => 'front_order_id',
'order' => 'ASC',
'hide_empty' => 0,
'hierarchical' => 1,
'exclude' => 1,
'include' => '1,3,4,2,5',
'number' => '',
'taxonomy' => 'category',
'pad_counts' => false
);
$categories = get_categories($args);
term_group
. - View Question / Answer. The order is entirely custom and can easily be changed in the backend.