Filter
rpress_templates_dir
On this page
Filters the theme folder name that holds template overrides.
Runs in rpress_get_theme_template_dir_name(). The default is 'restropress', so a theme overrides plugin templates by placing copies in a restropress folder. The result is given a trailing slash.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$dir_name | string | Directory name, default 'restropress'. |
Return value#
string. Directory name inside the theme.
Example#
function my_templates_dir( $dir_name ) {
return 'my-restropress';
}
add_filter( 'rpress_templates_dir', 'my_templates_dir' );
Source#
Applied in:
includes/template-functions.php(line 714), inrpress_get_theme_template_dir_name()
See also#
Was this page helpful?
