I'm trying to change the sort order of posts displayed in the archive/search page to sort by a meta key value. My meta key is 'work' and the value is numerical.
I think I'm suppose to add the following code somewhere, but I'm not quite sure where's the best place to add it:
$query = new WP_Query( array ( 'orderby' => 'meta_value', 'meta_key' => 'work' ) );
I'm using a child theme.
Any help will send waves of good karma your way.