Changing the filter category order in Photolux

Please Note: Theme customizations go beyond the scope of our support services and this article is provided solely as a courtesy to our customers. Please take a moment to review the Scope of our Support.

WordPress by default doesn’t provide an order option to the categories. One way to set a custom order to your categories would be to order them by their slug. To do this, first you have to open the template-grid-gallery.php file and modify line 44:

$args=array("hide_empty"=>false, "hierarchical"=>true);

to be like this:

$args=array("hide_empty"=>false, "hierarchical"=>true, 'orderby'=>'slug');

with this change your categories will be ordered by slug, so by editing their slug you can change the order. One option would be to append a number like this:

1-photography
2-landscapes
3-portraits

Was this useful? 3