Set custom post title to read only by user

For gain result custom post titles read-only for all users except the admin, you can use the edit_post capability along with the admin_init hook.

add_action('admin_init', 'restrict_custom_post_title_editing');

function restrict_custom_post_title_editing() {
    // Check if the current user is not an admin
    if (!current_user_can('administrator')) {
        // Get the post types for which you want to restrict title editing
        $restricted_post_types = array('your_custom_post_type_slug_here');

        // Loop through each restricted post type
        foreach ($restricted_post_types as $post_type) {
            // Remove the capability to edit the post title
            remove_post_type_support($post_type, 'title');
        }
    }
}

deneme bonusudeneme bonusu veren sitelerpulibet girişOnwin Güncel Giriştürkçe altyazılı pornocanlı bahis casino