# Highlight Your Own Posts in Admin Lists

> Gives rows you authored a subtle colored edge in admin post lists, so on busy multi-author sites you can spot your own work at a glance.

- Type: PHP
- Runs: Admin only
- Category: [Admin](https://wpide.com/library/category/admin/)
- Tags: admin-lists, authors, multi-author
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/admin-highlight-my-posts/

## Code

```php
// Edge color for your rows.
$wpide_my_rows_color = '#2271b1';

add_filter( 'post_class', function ( $classes, $class, $post_id ) {
    if ( is_admin() && (int) get_post_field( 'post_author', $post_id ) === get_current_user_id() ) {
        $classes[] = 'wpide-mine';
    }
    return $classes;
}, 10, 3 );

add_action( 'admin_head-edit.php', function () use ( $wpide_my_rows_color ) {
    printf( '<style>.wp-list-table tr.wpide-mine th.check-column{box-shadow:inset 4px 0 0 %s}</style>', esc_attr( $wpide_my_rows_color ) );
} );
```

## Notes

Change $wpide_my_rows_color to match your admin color scheme.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Highlight Your Own Posts in Admin Lists" 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/
