backstretch_single_override

Description

In the event that you need to force a particular post / page / category etc to have a specific image loaded, this filter allows you to set that. This will override any settings saved in the plugin or individual content.

Usage

Load the image

function rkv_single_override( $image ) {

	$image	= MY_DOMAIN.'/images/my-single-override.jpg';

	return $image;
}
add_filter( 'backstretch_single_override', 'rkv_single_override');

Load the image for a category

function rkv_single_category_override( $image ) {

	if ( is_category( 'MY-CATEGORY-SLUG' ) ) {
		$image	= MY_DOMAIN.'/images/my-single-override.jpg';
	}

	return $image;
}
add_filter( 'backstretch_single_override', 'rkv_single_category_override');