Add view to admin menu to filter for specific criteria ( If post is child of specific Parent )

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 );
    }
  }
}

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)