Hi,
I have the same situation but with multiple checkbox,
select_section = is where the post will be displayed (fine with that)
pin_article = is a checkbox with few options (project is one of them), when is checked this post should be pinned on project page.
Problem is making the pinned post to be displayd first on project page.
work fine with single checkbox but with multiple values is not working anymore.
Any solution to that?
$query_args = array(
'numberposts' => -1,
'posts_per_page' => 4,
'post_type' => 'project_post',
'meta_key' => 'pin_article',
'orderby' => 'meta_value',
'meta_query' => array(
'relation' => 'OR',
array(
'key' => 'select_section',
'value' => 'home',
'compare' => 'LIKE'
),
array(
'key' => 'pin_article',
'value' => 'project',
'compare' => 'LIKE'
)
));