Apologies if this is the wrong section to post this, but, I’ve built two custom fields that I’d like to use to display curated content on my front page. The fields appear on both posts and pages. The first is a True / False field, the second is a Radio Button field (options are: one, two, three…) to establish the display order. Each field is set manually.
I can set up the custom WP query so the posts/pages that return TRUE appear on the front page, but I can’t figure how to then set the orderby parameters to match the set radio button selection.
This is as far as I’ve gotten, which obviously isn’t correct:
$curated_content_query = new WP_Query(array(
‘post_type’ => array(‘post’, ‘page’),
‘posts_per_page’ => -1,
‘volume’ => $volume,
‘meta_query’ => array(
‘relation’ => ‘AND’,
array(
‘key’ => ‘curated_content’,
‘value’ => ‘1’,
‘compare’ => ‘=’
),
),
‘orderby’ => ‘meta_value’,
‘meta_key’ => ‘curated_order’
));
Is the issue the fact I’m using a radio button field (when I should be using a different field for a numerical value), or do I need to add an additional array to the meta_query?