Function wp_list_pages()
accepts arguments from get_pages()
function. To list pages filtered by custom field use meta_key
and meta_value
in parameters array. A list of accepted parameters can be found here and here.
wp_list_pages([
'meta_key' => 'your_meta_KEY',
'meta_value' => 'searched_value', // optional
]);
meta_value
is not mandatory, if you skip it, a list of pages with any value of the custom field will be returned.