Thursday, December 22, 2011

Set limit wp_list_pages

<?php
$numberPage = 5;

$pages = wp_list_pages("echo=0&title_li=");

$pages_arr = explode("\n", $pages);

for($i=0;$i<$numberPage;$i++){
 echo $pages_arr[$i];
}

?>

No comments:

Post a Comment