According to what I read it is because of an odd implementation of that function, apparently the number is used to add a Limit statement to the SQL that is used to get the pages. Then it applies the child_of requirement after retrieving the data from the database. So if you limit the query to 3 chances are you will not get any results that are also a child_of your page.
Instead leave the number parameter off and do the limit in your foreach block. Ie increment a variable and if it is greater than your limit, exit the for loop.
Related Posts:
- ssl_error_rx_record_too_long and Apache SSL [closed]
- Environment variable to control java.io.tmpdir?
- What is spark.driver.maxResultSize?
- Add robots.txt to root
- Using wp-uploads instead of wp-content/uploads
- Cannot get pages or posts to display
- how do I disable new user registration email for specific admin user?
- Disable WordPress Redirect From terminal
- Move wordpress files to sub-folder
- How do you set the default page in WordPress?
- www.website.com works but website.com redirects to website.com/index.html
- Copy wordpress settings to another blog
- Where do I add my own configuration needs and how do I access them?
- how to server over http and https with one installation
- command for checking Apache configuration
- How to import a module given the full path?
- WordPress Multisite with multiple domains using Nginx
- how to limit edit_form_after_title hook to page and post edit only?
- WP Page and Subdirectory with same name
- How to redirect on particular page in wordpress? [closed]
- Pagination with custom loop
- How to create a Page alias in WordPress
- Relative or Absolute Paths for Flash Video Player Files
- WordPress twenty eleven sidebar on Pages
- Debugging shortcode problems
- How to show updated edit on preview URL without clicking preview button
- What should be disabled to run on an internal network with no access to the Internet?
- Page Attachment Permalink Structure based on Menu Order?
- How to redirect a page to subdomain?
- How do I add a front menu button that redirects to another website or sub-domain?
- Slug is redirecting to 404
- Include content from one page to another
- How do I get blog posts to appear within CMS?
- List all private pages user has access rights to read
- “next page” of parent in infinite loop
- Access the same page from multiple urls (wildcard)
- How to update the counter of private pages in the dashboard?
- Configuring Propel to Work with Multisite
- Edit custom HTML page from WP admin dashboard
- Displaying different page links on different pages
- How to use is_admin in page content?
- Multiple Loops Breaking Pages
- Why isn’t WordPress respecting my HTML?
- Users – remove ‘send password’ checkbox
- Admin – no Featured image choice in create new/page|post
- From a developer’s point of view what are the differences between pages and posts? [closed]
- Merge page with custom post type
- Edit page shown after login in WordPress?
- Add Content to Content()
- how to get a list of all top level pages
- How do I edit text displayed on my browser tab?
- How are WordPress Page URLs affected by permalink settings?
- Page menu not showing in admin, new Page button missing in toolbar too
- How to add pages in wordpress using codes?
- How does the loop know which post to view?
- Keep page hierarchy in wp_list_pages, even if on a child or grandchild
- Order by modified date working in POSTS but not PAGES
- WordPress Page doesn’t load the template selected
- How to get main menu only with wp_nav_menu
- Setting limit to posts or page creation
- Tag template not returning posts [closed]
- Update page breaks permalinks
- post/page content
- WordPress Architecture as a CMS – Posts & Pages
- Is it to possible to insert a page in the post depending on the category ofthe post
- Add a menu metabox to post edit page
- Setting or plugin for showing submenus horizontally under the main menu, and keep them after selection
- Can I use Pages like a Wiki
- list child-pages as normal pages?
- Scripts external to WordPress cause 404 errors
- return page name in url
- Search anything from a Child and Sub-Pages of their Parent page
- Can i use 2 page content-forum & content-forum-slug on bbpress?
- Attaching a file to a page without adding to media library?
- Requiring a Visitor to Enter a Password Each Time They visit a Page
- Allow a page to be edited by a specific custom role
- How to make “single post” permalink maintain it’s sub-page structure
- is it bad to copy the loop for a template?
- WordPress form submit to custom page template does not work
- Page returns 404 for specific permalink
- How do I locate a third party page represented as a slug in my WordPress website?
- WordPress Contents Migration
- problem with loading pages
- Change all pages permalinks instead of hierarchical to have id of the page
- Blank white space where header was [closed]
- Any simple way to show 10 previous pages by id to current page in links as a menu
- Set order acs and no paging for archive page
- Pageview all of sudden not working
- Childpage title + content on Parent Page
- Advantages/Disadvantages Using Theme Editor Instead of Pages
- How to set up php,javascript and css to allow for our finished product to be displayed within a page?
- Getting error when trying to redirect WP site to mobile site
- Make Show Notes for Individual Podcast Episodes Easy to Find (multiple URL’s?)
- Displaying only posts from a certain category on my custom page template
- Category pagination first link works, remaining don’t
- Why doesn’t my page know it’s a page (won’t return true for is_page())?
- Custom post page has attributes of latest post [closed]
- WordPress “Posts Page” isn’t showing template dropdown
- How to have 2 posting pages on a blog
- WordPress is picking up links that don’t exist