I am using wp_list_pages to display our website's navigation.
The nav is supposed to be 2nd level pages only. I want the nav to display the array's first four items and then nest the rest of the items in a "more" dropdown.
What I'm trying to do is split the array so that the last few list items can be located in a different HTML tag that contains the more dropdown.
To display the first four items, I use 'include', however that requires the page ID. What I want is the first four items of the array no matter what the page ID is.
Two quick questions: How do I retrieve those first four items in the array? Is this the best way to split the array so that I can display the first four items and have the rest in a More dropdown?
Thanks in advance!
<?php
wp_list_pages(
array(
'child_of' => $section_top_parent,
'post_type' => 'section',
'title_li' => NULL,
'depth' => 1,
'include' => array(2285, 34272, 2286, 2287),
'sort_order' => 'asc'
));
?>