Skip to content
Docs
Get RestroPress

Filter

rpress_storefront_cover_image

Updated
On this page

Filters the cover image URL of the storefront cover header.

The default comes from the "Store Cover Image" setting (store_cover_image); a numeric value is resolved as an attachment ID. The image is used behind the store name when the layout masthead is cover. An empty string gives the cover header without an image.

Available since RestroPress 3.5.1.

Parameters#

ParameterTypeDescription
$coverstringImage URL, or ''.

Return value#

string. Image URL, or ''.

Example#

add_filter( 'rpress_storefront_cover_image', 'my_cover_image', 10, 1 );
function my_cover_image( $cover ) {
	if ( '' === $cover ) {
		$cover = get_stylesheet_directory_uri() . '/images/menu-cover.jpg';
	}
	return $cover;
}

Source#

Applied in:

  • includes/features/storefront-layout/functions.php (line 130), in rpress_storefront_cover_image()

See also#

Was this page helpful?