Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Compatibility with another plugin › Reply To: Compatibility with another plugin
Indeed.
I went ahead and checked the code in your functions.php file, and it appears that during my copy pasting the apostrophes were “corrected”, so it didn’t work. I’ve corrected that, now it should display the images finally.
For future reference, this is the final version with correct apostrophes:
[php]
/* Ajax Search Pro – Yith Vendor image display */
add_filter( ‘asp_results’, ‘asp_get_yith_vendor_data’, 1, 1 );
function asp_get_yith_vendor_data( $results ) {
foreach ($results as $k=>$v) {
if ( $v->content_type == "term" ) {
if( function_exists( ‘YITH_Vendors’ ) ){
$vendor_description = $vendor_logo = "";
$vendor = yith_get_vendor( $v->id, ‘vendor’ );
if( $vendor->is_valid() ){
$vendor_description = $vendor->description;
$vendor_logo = get_avatar_url( $vendor->get_owner() );
}
$results[$k]->image = $vendor_logo;
$results[$k]->content = $vendor_description;
}
}
}
return $results;
}
[/php]
-
This reply was modified 10 years, 2 months ago by
Ernest Marcinko.