wp_list_pages() Function exclude only works for the 1st ID
-
here is my code
<?php $ex_page = get_page_by_title( 'Privacy Policy' ); $ex_page_2 = get_page_by_title( 'Custom Quote' ); if ($ex_page === NULL) { $ex_page_id = ''; if($ex_page_2 === NULL){ $ex_page_id_2 = ''; } } else { $ex_page_id = $ex_page->ID; $ex_page_id_2 = $ex_page_2->ID; } wp_list_pages( array( 'depth' => 0, 'title_li' => '', 'exclude' => $ex_page_id_2,$ex_page_id ) ); ?>
This code is excluding only the 1st Page ID, also if I swap the page ids, it excludes the 1st ID provided.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘wp_list_pages() Function exclude only works for the 1st ID’ is closed to new replies.