You’ll need to test that this works, but I’ve just been looking at source and I think it will.
wp_list_pages
doesn’t officially take meta keys or values in its arguments, but it does pass its argument array straight on to get_pages
, which does allow you to make a meta query. So, you ought to be able to do this to get pages where the custom field member_2
has the value yes
:
echo wp_list_pages( array(
'meta_key' => 'member_2',
'meta_value' => 'yes',
) );
I’d be interested to know if it works!