Problem in get_pages with child_of and number
I have been reading the code of the function get_pages in the file wp-includes/post.php, and I found that get_pages first get all the pages that comply with the arguments. If I limit the query to some number of pages like 2, the size of the return cant be grater than 2.
Then if I setup child_of with an ID, executes get_page_children with the array of pages obtained before in the second parameter.
Thats the problem! Only get the childs of a page from 2 pages, not from all pages that comply with the query.
If I use parent instead of child_of the return its ok, but ins’t the same, we know the difference between both parameters.
If Im wrong, please let me know.
- The topic ‘Problem in get_pages with child_of and number’ is closed to new replies.