I know in wp-config.php editing this line:
define('WP_DEBUG', true); - on display error
define('WP_DEBUG', false); - off display error
I just want only display error in specific template or page.
I know in wp-config.php editing this line:
define('WP_DEBUG', true); - on display error
define('WP_DEBUG', false); - off display error
I just want only display error in specific template or page.
@PieterGoosen gave some good advice. Focus on that,
But if you really wan it, then you can set debug ON temporarily on your website this way.
In your wp-config.php
use this instead.
if ( isset( $_GET['debug'] ) && 'debug' == $_GET['debug'] ) {
define( 'WP_DEBUG', true );
}
Then access your website homepage/any page and add ?debug=debug
at the end of URL.
For example if you have page www.example.com/about/
then use this link to enable debug.
http://www.example.com/about/?debug=debug