Skip to content

Instantly share code, notes, and snippets.

@Grom-S
Created October 24, 2013 18:54
Show Gist options
  • Save Grom-S/7142948 to your computer and use it in GitHub Desktop.
Save Grom-S/7142948 to your computer and use it in GitHub Desktop.
$posts = get_posts(array(
'numberposts' => -1,
'post_type' => 'link',
'meta_query' => array(
array(
'key' => 'related_to',
'value' => get_the_ID(),
'compare' => 'LIKE'
)
)
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment