This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Different Types on multisite

#28287
till.kemper61till.kemper61
Participant

It is not working, i put in this code to my /wp_njf_multisite/wp-content/themes/Avada/functions.php but noting is happening in the frontend.

/*PDF Logo in Search*/
add_filter( 'asp_results', 'asp_attachment_image_custom', 10, 1 );
function asp_attachment_image_custom( $results ) {
	// Parse through each result item
	foreach ($results as $k=>&$r) {
		// PDF custom image
		if ( isset($r->post_mime_type) && strpos(strtolower($r->post_mime_type), 'pdf') !== false ) {
			$r->image = 'https://media.njf.de/2020/07/pdf.png';
		}
	}

	return $results;
}

If you will probatly test it i have actualisate the ftp entry