# Show the Admin Screen ID in the Footer

> Displays the current screen ID, base, post type and hook suffix in the admin footer for administrators, which is exactly what you need when targeting a screen in your own code.

- Type: PHP
- Runs: Admin only
- Category: [Developer](https://wpide.com/library/category/developer/)
- Tags: debugging, admin, screen
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/debug-screen-id-in-footer/

## Code

```php
add_filter( 'update_footer', function ( $text ) {
    $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : null;
    if ( ! $screen || ! current_user_can( 'manage_options' ) ) {
        return $text;
    }

    return sprintf(
        '<code>id: %s</code> <code>base: %s</code>%s <code>hook: %s</code> &middot; %s',
        esc_html( $screen->id ),
        esc_html( $screen->base ),
        $screen->post_type ? ' <code>post_type: ' . esc_html( $screen->post_type ) . '</code>' : '',
        esc_html( $GLOBALS['hook_suffix'] ?? '' ),
        $text
    );
}, 99 );
```

## Notes

Use the values with get_current_screen() checks or the admin_enqueue_scripts hook suffix.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Show the Admin Screen ID in the Footer" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
