If you just need to remove, or ignore, it from $pages
, use the exclude
argument instead;
$pages = wp_list_pages( array(
'exclude' => get_option( 'page_on_front' ),
'child_of' => $parent,
'parent' => $parent,
'sort_column' => 'post_title',
'title_li' => '',
'hierarchical' => '0'
) );
I’ve used wp_list_pages
as I assume this is the function you’ve intended to use (get_pages
does not have a title_li
argument).
If that isn’t what you were after, then just loop over the pages to determine if it’s there;
foreach ( $pages as $page ) {
if ( $front_is_here = ( $page->ID == $front_id ) )
break;
}
if ( $front_is_here ) {
// front page is among pages
} else {
// front page is *not* among pages
}