Skip to content
Docs
Get RestroPress

Filter

rpress_templates_dir

Updated
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#

ParameterTypeDescription
$dir_namestringDirectory 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), in rpress_get_theme_template_dir_name()

See also#

Was this page helpful?