# Keep Checked Categories in Their Place

> Stops the classic editor from moving ticked categories to the top of the list, so the category tree keeps its order.

- Type: PHP
- Runs: Admin only
- Category: [Admin](https://wpide.com/library/category/admin/)
- Tags: admin, classic-editor, categories
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/keep-checked-categories-in-place/

## Code

```php
add_filter( 'wp_terms_checklist_args', function ( $args ) {
    $args['checked_ontop'] = false;

    return $args;
} );
```

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Keep Checked Categories in Their Place" 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/
