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

Reply To: Compatibility with another plugin

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Compatibility with another plugin Reply To: Compatibility with another plugin

#8160
Ernest MarcinkoErnest Marcinko
Keymaster

Okays. In this case, try putting this to the functions.php file in your active theme directory:

[php]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( $term_id, ‘vendor’ );
if( $vendor->is_valid() ){
$vendor_description = $vendor->description;
$vendor_logo = get_avatar( $vendor->get_owner(), get_option( ‘yith_vendors_gravatar_image_size’, ’62’ ) );
}
$results[$k]->image = $vendor_logo;
$results[$k]->content = $vendor_description;
}
}
}

return $results;
}[/php]

Let’s hope it will work.