Skip to content
Docs
Get RestroPress

Filter

rpress_storefront_rail_title

Updated
On this page

Filters the heading of a storefront rail.

Core headings are Popular, Order again and Deals; a rail key without a core heading starts as an empty string. The heading is escaped when printed.

Available since RestroPress 3.5.1.

Parameters#

ParameterTypeDescription
$titlestringHeading text.
$railstringRail key.

Return value#

string. Heading text.

Example#

add_filter( 'rpress_storefront_rail_title', 'my_rail_title', 10, 2 );
function my_rail_title( $title, $rail ) {
	return 'popular' === $rail ? __( 'Customer favourites', 'my-plugin' ) : $title;
}

Source#

Applied in:

  • includes/features/storefront-layout/functions.php (line 441), in rpress_storefront_rail_title()

See also#

Was this page helpful?