I'm using this code to list child pages of the current page and similar code to get child pages of all ancestors to use in a sidebar contextual hierarchical nav menu:

$pageset = get_posts('numberposts=0&post_type=page&post_parent='.$wp_query->post->ID);

For some reason, both iterations are ignoring posts with a two-digit post id. Everything else shows up fine.

Am I missing something? Do I have a setting that's incorrect? I'm banging my head here...

link|improve this question

50% accept rate
feedback

1 Answer

up vote 2 down vote accepted

It might be because you are using numberposts=0 If you want to return all posts then you need to use -1 not 0

link|improve this answer
Sweet deal! I got bad info on a tutorial page, and I couldn't find a good explanation of that paramater on the Codex. Any idea what "0" actually does on that parameter? – jfacemyer Feb 1 at 19:30
Interestingly, there was still some sort of issue preventing this "family" (the parent and siblings) context from showing in a hierarchy, while every other "family" of menu items did (even those adjacent on the same level). All I did was move those three to a different parent and it worked fine, then I moved them back and it worked fine still. Something buggy going on there... – jfacemyer Feb 1 at 19:32
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.