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
- How to display by default only published posts/pages in the admin area?
- Set Default Listing “View” in Admin
- Removing any and all inline styles from the_content()
- Sends out email to admin
- Can I force a metabox to be in one column?
- Add a new post status in the post progression
- 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
- Why is wordpress removing some unicode characters (e.g. some emojis) when I save my post?
- which action to hook to in order to perform post-publish action
- Filter posts by author and category simultaneously
- 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?
- how “manage_posts_custom_column” action hook relate to “manage_${post_type}_columns” filter hook?
- How to get a nofication when post submitted
- Double count view in archive.php
- Getting post id from wp_insert_post_data function?
- Adding a text link under the post title in the lists of posts
- Is it possible to change the admin posts per page view?
- Amend wordpress password function
- How can I remove posts of a certain category from homepage after a specified time period?
- Change default Posts page
- Modify WP_Post before processing
- 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?
- Show info to author only
- How to add Tags Filter in wordpress admin dashboard
- Applying $posts_clauses filter to specific queries only
- Admin Posts Table Column Fitlering is not working for Custom Post Type
- Disable inline_edit() on edit.php
- What is the filter or hook to add admin controls to posts on the front end?
- 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 to filter my search in post if contains a word in title, content or excerpt?
- 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
- WP Admin register taxonomy and post type performance
- Trying to alter the post_content through the_post
- Add filter to the end of the post
- Get post content with all filters applied, knowing post id
- Is it possible to filter the main loop to exclude posts from a specific category?
- query post limits
- How can I add a box to edit Order on a regular post?
- How to add the time of a post to the list of posts on the administration page?
- Change the default blog post post attribute template name from “default template” to something else
- Is it possible to add a shortcode below post title?
- restrict incrementation of post vies count when refreshing the page
- Post filtering is returning blank page
- Updating permalink structure using ‘post_link’ filter results in 404 error for posts
- I don’t want the complete article to show on homepage
- Send email to admin with post author
- sort posts by getPostViews in functions.php
- wp_list_categories() Exclude All Categories Except One
- Get current taxonomy and display query accordingly
- Add checkbox in admin post list – show checked post in widget
- How do I display main query posts in random order using add_filter
- Count the total views of all user posts published
- Cannot create new posts or upload images using media manager
- Rewrite image links from attachment id to attachment link
- Best way to fix bad count on All | Mine | Published
- Restricting displayed posts to posts from only select authors
- the wp_post_update isn’t working all the time
- How to add a custom class attribute into code wrapper? [duplicate]
- Filtering private Posts
- Ignore posts content in the posts queries for internal linking
- how to filter posts by category without page load (ajax) in wordpress?
- How do I scope out why I have two “posts” menus in an admin?
- Remove status ‘archived’ from the default post and page view
- long-title posts do not want published
- How to add a block to a category page?
- How do i search post by jquery datepicker?
- show only one category and filter by tag
- How to Display Most View Post in the template file?
- problem with admin panel
- Prevent WordPress from putting around specific element
- filter buddypress users posts by user ‘xprofile’ custom fields
- Is it possible to completely replace a post with an action/filter?
- Filter question list on substring of metavalue
- Add review box by function at top or bottom of content
- Get results from the main wp_query
- How to use in_category?
- Why is $_POST Empty in Profile Edit Admin?
- Display the popular tags by default in the backend post edit page (without having to click on the link that displays them) [closed]
- WordPress Admin Tables in Post View
- Can I hide only one category from admin post list?
- wp_query posts sorting doesn’t work
- Posts in Admin only display 1 Post instead of all
- How to remove a specific script from bulk wordpress posts and images description?
- Post Format Status [closed]