wordpress remove add new button

To remove the "Add New" button in WordPress, you can use the following steps:

  1. Go to your WordPress dashboard.
  2. Navigate to the "Appearance" section and click on "Editor."
  3. In the Editor, locate and select the "functions.php" file from the list on the right-hand side.
  4. Add the following code at the bottom of the "functions.php" file:
function remove_add_new_button() {
  global $wp_admin_bar;
  $wp_admin_bar->remove_node('new-content');
}
add_action('wp_before_admin_bar_render', 'remove_add_new_button');
  1. Click the "Update File" button to save the changes.

Once you have followed these steps, the "Add New" button should no longer be visible in your WordPress dashboard.