Hi I've got this menu that display all the child page menu of the current page works fine to that point, but i now only want to display the child pages that custom field has value of (thememenu) but it still diaply all the child page when I try help please <ul> <?php // display all the child and granchild page links exclude link of page parent_pages_to_exclude $extra_menu = get_post_meta($post->ID, 'extra_menu', true); $parent_pages_to_exclude = array(198,701,3247); // excluded pages foreach($parent_pages_to_exclude as $value) { // for each value inside array parent_pages_to_exclude add the value in the variable value if ($page_exclusions) { $page_exclusions .= ',' . $value && $extra_menu == "thememenu"; } // this has the values of all the child pages excluded and included else { $page_exclusions = $value; } } wp_list_pages( array('title_li'=>'','depth'=>3, 'exclude'=>$page_exclusions,'child_of'=>get_post_top_ancestor_id()) ); ?> </ul>