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

Reply To: Different Types on multisite

#28285
Ernest MarcinkoErnest Marcinko
Keymaster

Hi Till,

Well, not possible via settings, but it might be possible via custom coding. Try adding this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!

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://archiv.njf.de/wp-content/plugins/download-manager/assets/file-type-icons/pdf.svg';
		}
	}

	return $results;
}