Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getParents($childPostId, $parentPostType, $acfKey) {
- return get_posts(array(
- 'post_type' => $parentPostType,
- 'meta_query' => array(
- array(
- 'key' => $acfKey,
- 'value' => '"' . $childPostId . '"',
- 'compare' => 'LIKE'
- )
- )
- ));
- }
Add Comment
Please, Sign In to add comment