Title: theme_file_path
Published: December 6, 2016
Last modified: February 24, 2026

---

# apply_filters( ‘theme_file_path’, string $path, string $file )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/theme_file_path/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/theme_file_path/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/theme_file_path/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/theme_file_path/?output_format=md#changelog)

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

Filters the path to a file in the theme.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/theme_file_path/?output_format=md#parameters)󠁿

 `$path`string

The file path.

`$file`string

The requested file to search for.

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

    ```php
    return apply_filters( 'theme_file_path', $path, $file );
    ```

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

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

| Used by | Description | 
| [wp_theme_has_theme_json()](https://developer.wordpress.org/reference/functions/wp_theme_has_theme_json/)`wp-includes/global-styles-and-settings.php` |

Checks whether a theme or its parent has a theme.json file.

  | 
| [WP_Theme::get_file_path()](https://developer.wordpress.org/reference/classes/wp_theme/get_file_path/)`wp-includes/class-wp-theme.php` |

Retrieves the path of a file in the theme.

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

Retrieves the path of a file in the theme.

  |

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

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

## User Contributed Notes

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