[WordPress] How to prevent grandchild category from being created

Code

functions.php

function my_admin_style() {
echo '<style>

option.level-1{
display:none;
}

</style>'.PHP_EOL;
}
add_action('admin_print_styles', 'my_admin_style');

Related article