Disable notices and warnings In WordPress.



In Worpress if you want to disable the php notices and warnings, its very simple and you can disable it by using the code below:

Step 1. Just Open the wp-settings.php file in the editor of your choice.
Step 2. Insert the below code chunk in this file

<?php

//Add define('WP_DEBUG',true);
//to wp-config.php to enable display of notices during development.
if (defined('WP_DEBUG') and WP_DEBUG == true){
    error_reporting(E_ALL);
} else {
    //error_reporting(E_ALL ^ E_NOTICE ^ E_USER_NOTICE);
    error_reporting(0);
} 

?>

You have done, check the errors. Hope this helps.