add_action( 'template_redirect', 'all_categories_not_found' );
function all_categories_not_found() {
if ( is_category()) {
global $wp_query;
$wp_query->set_404();
status_header( 404 );
require get_404_template();
die();
}
}
background-color: #141936;
$category_id = get_queried_object_id();
$imgcat = get_field( 'imgcat1', 'category_'.$category_id);
if ($imgcat) {
echo '<div class="img"><img src="' . $imgcat . '"/></div>';
}