Title: get_404_template
Published: April 25, 2014
Last modified: May 20, 2026

---

# get_404_template(): string

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/get_404_template/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/functions/get_404_template/?output_format=md#see-also)
 * [Return](https://developer.wordpress.org/reference/functions/get_404_template/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/get_404_template/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/get_404_template/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/get_404_template/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/get_404_template/?output_format=md#wp--skip-link--target)

Retrieves path of 404 template in current or parent template.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/get_404_template/?output_format=md#description)󠁿

The template hierarchy and template path are filterable via the [‘$type_template_hierarchy’](https://developer.wordpress.org/reference/hooks/type_template_hierarchy/)
and [‘$type_template’](https://developer.wordpress.org/reference/hooks/type_template/)
dynamic hooks, where `$type` is ‘404’.

### 󠀁[See also](https://developer.wordpress.org/reference/functions/get_404_template/?output_format=md#see-also)󠁿

 * [get_query_template()](https://developer.wordpress.org/reference/functions/get_query_template/)

## 󠀁[Return](https://developer.wordpress.org/reference/functions/get_404_template/?output_format=md#return)󠁿

 string Full path to 404 template file.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/get_404_template/?output_format=md#source)󠁿

    ```php
    function get_404_template() {
    	return get_query_template( '404' );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/template.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/template.php#L134)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/template.php#L134-L136)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/get_404_template/?output_format=md#related)󠁿

| Uses | Description | 
| [get_query_template()](https://developer.wordpress.org/reference/functions/get_query_template/)`wp-includes/template.php` |

Retrieves path to a template.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/get_404_template/?output_format=md#changelog)󠁿

| Version | Description | 
| [1.5.0](https://developer.wordpress.org/reference/since/1.5.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fget_404_template%2F)
before being able to contribute a note or feedback.