Limit wp_page_list ?
-
I’ve read through the codex that I think is relevant and I can’t find an answer.
I’m trying to dynamically limit the wp_page_list on my sidebar. I don’t want to get into excluding manually because that will require way too many sidebars.Basically, I have about 40 child pages and I’d like to only show maybe the most recent 10 or 15 in my sidebar. Is there a way to do this?
This is what I’m using to display the list.
<?php if($post->post_parent) $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); else $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0"); if ($children) { ?> <?php echo $children; ?> <?php } ?>
[Please post code snippets between backticks or use the code button.]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Limit wp_page_list ?’ is closed to new replies.