Declare the following function in your functions.php
function wpse58346_wp_list_pages( $pages, $r ) {
foreach( $pages as $key => $page ) {
if ( 50 < $page->menu_order )
unset($pages[$key]);
}
return $pages;
}
Now before calling wp_list_pages()
apply a filter as follows
add_filter('get_pages', 'wpse58346_wp_list_pages', '', 2);
And after you have called wp_list_pages()
you can remove the filter so that it doesn’t mess with some other funcctionality
remove_filter('get_pages', 'wpse58346_wp_list_pages');
Related Posts:
- How does wordpress calculate the page depth?
- Check whether the child page has siblings
- How to exclude shortcode from specific page IDs if it’s set to global
- How to echo excerpts with wp_list_pages?
- Extra title output with this function wp_list_pages
- List child pages by slug not ID?
- I Changed the Menu Order, But the Page Order Didn’t Change on Front Page
- Remove ID page from wp_count
- Combining ‘depth’ with ‘include’ in wp_list_pages()
- get_pages() as per custom menu order
- Get the ID of the direct parent page
- Get parent of current page
- Post Fetching Ignoring Sort_Column?
- Change page name in admin list
- Check if the child page has sibling pages, and bookmark current page
- Keep page hierarchy in wp_list_pages, even if on a child or grandchild
- Check if page has subpages
- Exclude child pages args array
- How should I set up a Tumblr blog at a WordPress Page?
- Search results to be only posts & children of page ID
- Translate dashboard metabox
- Include parent page in list of child pages
- How to get an array of pages ID by some page’s slug and all its children pages in get_posts() function?
- wp_list_pages get the hole hierarchy for current page
- Remove and change pages label
- Get All Pages as strings in array
- How to exclude sidebar from pages?
- How To List Sibling Pages And Include The Featured Image?
- How to make in post Parent page children page list nummbered
- exclude page element from specific pages
- Custom wp_list_pages() function
- How to get current page ID outside the loop?
- featured image as background image on pages
- Can I display submenus in groups, using wp_list_pages?
- Order by menu_order and title?
- WP Page and Subdirectory with same name
- How to inject custom url path for page ?
- How to display page title+link of page created by user
- get_page_by_title not working when used with a variable
- WordPress twenty eleven sidebar on Pages
- How to disable Page Attributes dropdown in wp-admin
- How to show updated edit on preview URL without clicking preview button
- How to make certain page templates visible to admin only
- Editing Pages that Have Already Been Published
- Page Attachment Permalink Structure based on Menu Order?
- How to redirect a page to subdomain?
- Getting child content
- Clean URL link for page without number
- How can I have two content titles?
- Get the Page Content,without generating HTML
- How can I split long posts into pages?
- Slug is redirecting to 404
- Adminbar Missing “Edit Page”
- “next page” of parent in infinite loop
- Access the same page from multiple urls (wildcard)
- Layout Builder.
- Pass data from one page to anothe file/page in wordpress
- Get the Current Page Slug-Name
- Display child pages in a parent page? [closed]
- block a page from logged out users and redirect to homepage
- how can i remove page title on desktop view
- Is there a way to schedule changes to a page?
- How do I edit text displayed on my browser tab?
- Option for pages order in backend
- Return subpages of an author if the parent page was published by an other author
- Page menu not showing in admin, new Page button missing in toolbar too
- Allow a user to edit their own page and profile only
- WordPress Page doesn’t load the template selected
- Custom folder for wordpress page templates
- Separate URL for a specific page
- Pages that don’t look like blog posts?
- Can I use Pages like a Wiki
- list child-pages as normal pages?
- Next and Previous Page links based on ‘Order’ attribute
- Create multiple pages with tables from json file
- Attaching a file to a page without adding to media library?
- Every change made by “Author” role is going to “pending review”
- Groping Pages Per Department Option
- Requiring a Visitor to Enter a Password Each Time They visit a Page
- WordPress default theme cannot get full page on entry content div
- How to remove the duplicate title tags and duplicate meta descriptions?
- Two different layouts for the same post
- My page title turns into a h2 tag – What to do?
- problem with loading pages
- How to turn post into pages and via versa?
- Content not displaying on page
- Blank white space where header was [closed]
- Featured Image not displaying in a page
- Display child pages on homepage template
- Set order acs and no paging for archive page
- Pageview all of sudden not working
- Childpage title + content on Parent Page
- Using wp_list_pages to create 2 lists of pages and include and exclude some of them depending on their category
- search page different results
- simple category search form returns full text – but I need excerpts
- Naming custom page templates
- How can I use Page editor for two separate templates?
- Sort the data in WordPress using get-page-by-title
- Adding a filter to wp_edit_posts_query() to prevent hierarchical display of pages
- In WP, Google map error initMap is not a function [closed]