Managing a website with many nested pages can be challenging when you need to identify each page’s parent.
This snippet adds a Parent Page column to the WordPress admin Pages list. It displays the parent page’s title and provides a convenient link to edit it.
How to use
- Add the code to your child theme’s
functions.phpfile or a PHP snippets plugin. - Navigate to WordPress Admin → Pages → All Pages.
- Find the new Parent Page column.
- Click a parent page’s title to open its editor.
Expected result
| Page | Parent Page |
|---|---|
| About Us | — No Parent — |
| Our Team | About Us |
| Leadership | Our Team |
| Contact | — No Parent — |
Example data only.
Notes
- Works with WordPress Pages and their parent-child hierarchy.
- Top-level pages display “— No Parent —”.
- Parent titles link to their edit screens when the current user has access.
- Uses WordPress APIs and escapes displayed output.
- Does not modify page hierarchy or content.
/**
* Add a Parent Page column to the Pages list.
*/
add_filter( 'manage_pages_columns', 'alkesh_add_parent_page_column' );
function alkesh_add_parent_page_column( $columns ) {
$columns['parent_page'] = __( 'Parent Page', 'alkesh' );
return $columns;
}
/**
* Display the parent page title.
*/
add_action(
'manage_pages_custom_column',
'alkesh_display_parent_page_column',
10,
2
);
function alkesh_display_parent_page_column( $column_name, $post_id ) {
if ( 'parent_page' !== $column_name ) {
return;
}
$parent_id = wp_get_post_parent_id( $post_id );
if ( ! $parent_id ) {
echo esc_html__( '— No Parent —', 'alkesh' );
return;
}
$parent_title = get_the_title( $parent_id );
$edit_link = get_edit_post_link( $parent_id );
if ( ! $parent_title ) {
echo esc_html__( 'Parent Unavailable', 'alkesh' );
return;
}
if ( $edit_link ) {
printf(
'<a href="%1$s">%2$s</a>',
esc_url( $edit_link ),
esc_html( $parent_title )
);
return;
}
echo esc_html( $parent_title );
}
Tested on
WordPress 7.1.3
WordPress Admin
Reported by the author on October 27, 2026. WPFolks has not verified this.
