I’ve a customized submit sort "issues".
I’m utilizing Superior Customized Fields so as to add a relational subject known as "articles_from_this_issue" the place the admin can choose a number of articles.
I’ve an creator template the place I show all the authors posts (articles).
I want to question the "issues" customized submit sort and test to see if every article is likely one of the chosen "articles_from_this_issue"
here’s what I’ve tried thus far however nothing appears to work.
$issues_args = array(
'post_type' => 'points',
'meta_query' => array(
'relation' => 'OR',
array(
'key' => 'articles_from_this_issue',
'worth' => serialize( intval(get_the_ID()) ),
'evaluate' => 'LIKE'
),
));
$the_issues_query = new WP_Query( $issues_args );
I’ve additionally tried this:
$issues_args = array(
'post_type' => 'points',
'meta_query' => array(
array(
'key' => 'articles_from_this_issue',
'evaluate' => 'LIKE',
'worth' => get_the_ID(),
),
));
Here’s what the database reveals within the "wp_postmeta" desk:
meta_id: 27533
post_id: 733
meta_key: articles_from_this_issue
meta_value: a:2:{i:0;s:4:"3187";i:1;s:4:"3230";}
Any and all assist is far appreciated!