Ok, I think I’ve figured out a way to use that on my site:
$args = array(
'orderby' => 'name',
'order' => 'ASC',
'exclude' => '3');
$categories = get_categories($args);
//var_dump($categories)
foreach ($categories as $cat) {
echo "<h1 id=\"category-header\">" . $cat->name . "</h1>";
query_posts('meta_key=Filename&orderby=meta_value&order=DESC&posts_per_page=-1&category_name='.$cat->name);
get_template_part('content', 'home');
}
But is there a way to choose the order that the categories sort by, preferably a user-defined order? I found a blog post on this:
https://www.wphub.com/sorting-categories-custom-sort-order/
But just wondering if there is a simple way not involving plugins & etc?