Thread Starter
IWEBIX
(@iwebix)
Did you read my question?
I need to limit the first level navigation output, nothing is written about that on your linked page (which I already red a couple of times).
Probably need to use Function_Reference/get_pages and craft your own output.
Or use a query_posts for post_type=page.
You could limit the number of first level pages, and only the first level pages, with something like this:
echo '<ul>';
$parent = get_pages('sort_column=menu_order&parent=0&number=6');
foreach($parent as $page) {
echo '<li>';
echo '<a href="' . get_permalink() . '" title="' . $page->post_title . '">';
echo $page->post_title;
echo '</a>';
$postparent = $page->ID;
$child = get_pages("sort_column=menu_order&child_of=$postparent");
if ($child) {
wp_list_pages("title_li=&sort_column=menu_order&child_of=$postparent");
}
echo '</li>';
}
echo '</ul>';
In the example above I’m limiting the number of pages to “6” using the number parameter. It’s not limiting by number of characters but I hope this helps you get closer to your solution.
Good luck!