Hi am sorry to ask, i hab been trying to find a solution for 4 straight hours without success and now hope for your help.
i have created a CPT called “members”
For my regular (articles) posts I have added a ACF “relationship” field, called “author” to select members. This field is set to return the ID (not object). So far this works, it outputs the member’s post ID when testing.
To display the members profile-page i have created a layout in Cornerstone.
I am tying to accomplish that beneath a members profile-information to also show 3-4 related articles of that member. I tried that by using a WP-Query-String but no matter what i try, posts are showing but not only the ones i hoped for, it just displays all posts, disregarding the query to only pull the ones with the right ID. For testing i hardcoded ‘342’ which is the ID of my own member-page, if it works i will replace it with {{dc:post:id}} in the member-layout.
I used the following args:
$args = array(
‘post_type’ => ‘post’,
‘meta_query’ => array(
‘key’ => ‘author’,
‘value’ => 342,
‘compare’ => ‘==’,
‘type’ => ‘numeric’
),
);
var_dump( http_build_query( $args ) );
OUTPUT:
post_type=post&meta_query%5Bkey%5D=author&meta_query%5Bvalue%5D=342&meta_query%5Bcompare%5D=%3D%3D&meta_query%5Btype%5D=numeric