Redirect to 404 (wordpress)

Redirect any template to 404 page.

<?php
    global $wp_query;
    $wp_query->set_404();
    status_header(404);
    exit();
?>

template.php

< toolbox