Outils pour utilisateurs

Outils du site


Panneau latéral

webdev:wordpress:plugin_dev:404

Redirection 404

	if( $shit == false )
	{
		// Term don't exist, throw a 404
		header('HTTP/1.1 404 Not Found');
		global $wp_query;
		$wp_query->set_404(); // Needed for the body class
		$_GET['e'] = 404; // Set the variable for the error code (you cannot have a querystring in an include directive).
		include get_template_directory() . '/404.php';
		exit();
	}
webdev/wordpress/plugin_dev/404.txt · Dernière modification: 18/10/2017 17:44 de dolo