Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Different Types on multisite › Reply To: Different Types on multisite
July 7, 2020 at 3:55 pm
#28287
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