I want to use ‘active’ as a secondary ‘orderby’, so that the posts maintain their default ordering (chronological) AND give priority to posts which are ‘active’. So an active post from 1-2-18 will be displayed above a non-active trade from 1-1-18.
If anyone has a clue which files I need to edit to make this happen, that would help as well.
I’m seeing the parameters for orderby in /wp-show-posts.php although they look incomplete. Not an expert in PHP but I could probably figure this out if I had some clues for where to look.
Edit: If it’s easier, I’ll mention that I don’t need to edit the metabox for any of this. I just want all posts to also check for the custom field the_field('active') and use that as a sort parameter following the default parameter. If ‘active’ is found for a post, it should appear before any post without ‘active’.
I’m not 100% sure how you’d do this, unfortunately.
If you’re able to get help with the WP_Query parameters, we can integrate them into WP Show Posts, as it sets up a WP_Query instance.
It may be worth asking over on wordpress.stackexchange.com if it’s possible to bring those posts with a meta value to the top using WP_Query. If someone can point us in the right direction there, we can make it work in the plugin.