query_posts -> get page_id from custom field
You get a custom field by using get_post_meta: <?php $pageID = get_post_meta( get_the_ID(), ‘custom_field_name’, true ); ?> You can then use that for the query you need, but you should not use query_posts, this function overrides the main query and isn’t normally used on themes or plugins, it should be avoided. This can increase page … Read more