You can “load the pages” via the pre_get_posts
action, like so:
add_action( 'pre_get_posts', 'my_admin_pre_get_posts' );
function my_admin_pre_get_posts( $q ) {
// Check whether the filter was clicked.
if ( isset( $_GET['post_parent'] ) ) {
$screen = is_admin() ? get_current_screen() : null;
// And that it's the edit pages page.
if ( $screen && 'edit-page' === $screen->id ) {
$post_parent = (int) $_GET['post_parent'];
$q->set( 'post_parent', $post_parent );
}
}
}
Related Posts:
- Update post counts (published, draft, unattached) in admin interface
- Add link on the top menu of the post table?
- Filtering posts on Post Administration Page by Week Number instead of by Month
- Hide Admin posts & pages in Dashboard
- How to remove a column from the Posts page
- Apply the_title() filter in post & page title, but not in menu title
- How to display by default only published posts/pages in the admin area?
- Set Default Listing “View” in Admin
- display all posts in wordpress admin
- Removing any and all inline styles from the_content()
- Removing filter dropdown in posts table (in this case Yoast SEO)
- Get old values for post before saving new ones
- Sends out email to admin
- Can I force a metabox to be in one column?
- How does filter the_posts work?
- Add a new post status in the post progression
- Help! Turn php link data into url OR hide edit link in post admin OR hide drafts for all users except admin?
- Modifying admin sidebar contents to show pending posts indicator
- How to publish a post with empty title and empty content?
- How to add a “publish” link to the quick actions
- Any way to create a revision of a post ONLY with a new button in the Meta Box?
- using slug instead of ID in admin edit post url
- How to Load Scripts and CSS for Admins Only When Editing or Adding Posts
- Add “Post Options” for new wordpress post
- Writing a view count with w3 total cache
- Why is wordpress removing some unicode characters (e.g. some emojis) when I save my post?
- Post Admin – Filter by posts without tags
- Add javascript when post is published
- Why does the_date work in the first custom column, but not in the second, in a series of customized Posts columns?
- how to display post content without post image?
- Add a special filter link to All Posts in admin
- Exclude category on blog list page
- How to remove_filter that filters iframes in posts? [duplicate]
- which action to hook to in order to perform post-publish action
- Filter posts by author and category simultaneously
- Make “Post published. View post” Open in a New Tab
- Overview with latest edited posts and pages
- Hiding by default specific post status on backend list?
- Filter post before *editing*
- Filter/Remove HTML Elements on all posts and pages
- Show post titles only on the homepage
- Custom colors for post rows based on post meta value
- How to add an admin function only to posts, not pages?
- prevent showing posts of an specific category in admin posts section
- Remove whitespace at the end of posts?
- Allow role to delete posts but block him the wp-admin
- Is there a way to change the color of a row in Post Administration based on the type of post?
- Add filter-by-tag in the all posts admin console page
- how “manage_posts_custom_column” action hook relate to “manage_${post_type}_columns” filter hook?
- How to get a nofication when post submitted
- If specific user role then sticky post
- Double count view in archive.php
- Sorting posts according to view counts not working
- Getting post id from wp_insert_post_data function?
- the_posts filter been called multiple time
- Filter Posts By Tag
- How do I add a custom body class to the admin area of a page?
- Custom excerpt length filter doesn’t work
- How can i do something after head like adding a hook for after head but before post
- Adding a text link under the post title in the lists of posts
- Only display posts after current date
- Is it possible to change the admin posts per page view?
- Amend wordpress password function
- Custom Post Templates
- Remove the Edit button in posts for permalinks on certain user roles? WP 3.3
- How can I remove posts of a certain category from homepage after a specified time period?
- How to generate numbers indistinguishable for the IDs of the posts
- Change default Posts page
- Modify WP_Post before processing
- How to filter posts that belong to a specific category only if that is the only category
- Make view count for pop up post
- Is there a way to have the view link on manage posts page to open in a new window or tab?
- How to retrieve the postID in a “image_send_to_editor” hook function?
- Show info to author only
- Filter Custom Post Type by Category with Ajax
- Ajax posts filter by date, comments, top views, top likes
- How to add Tags Filter in wordpress admin dashboard
- pre_get_posts query between 2 dates (date stored in custom post meta)
- Applying $posts_clauses filter to specific queries only
- how to remove dash (-) post status from post title on posts listing page wordpress
- Admin Posts Table Column Fitlering is not working for Custom Post Type
- Get latest posts from WordPress site without header, menu and sidebar
- Modify Image Source With The_Content Filter?
- Disable inline_edit() on edit.php
- What is the filter or hook to add admin controls to posts on the front end?
- Change post order random through out the entire WordPress
- use wpml_post_language_details function other plugin based on $post->ID [closed]
- How to hide html tags on revision comparison pages?
- Add filter by custom field to block of posts
- Ajax post filters not working
- Default to ‘all’ view on the ‘edit-post’ screen for authors
- Display Meta Values in Custom Filter – Admin Custom Posts
- How can I get global $post to work for CPT and update user?
- How to filter my search in post if contains a word in title, content or excerpt?
- More then one menu items are assigned with “current-menu-item” class
- Update post_content everytime a custom post is opened in backend
- Change target of view link in admin
- Posts and Attachments with “Published” status in Search
- Prevent additional top level categories but allow more children
- WP Admin register taxonomy and post type performance