Target only single product page
I assume you mean to use this on a single product’s page, right? If so, try this: add_action(‘admin_head’, ‘wwc_my_custom_css’); function wwc_my_custom_css() { if (!current_user_can(‘edit_pages’){ global $post; $isProduct = $post->post_type == ‘product’; // use the actual name for product if ($isProduct ) { echo ‘<style> #mceu_27-body, #wp-content-editor-tools{ display:none !important; } </style>’; } } }