Support

Account

Home Forums Front-end Issues Querying relationship fields not working Reply To: Querying relationship fields not working

  • try

    
    $related = get_posts(array( 'post_type' => 'post', 'meta_query' => array( array( 'key' => 'related_expertises', 'value' => '"'.get_the_ID().'"' , 'compare' => 'LIKE' )) ));
    

    Note that I am enclosing the post ID value in “”