Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Use of users custom fields in a product search
This topic contains 19 replies, has 2 voices, and was last updated by T0mX06 3 years, 11 months ago.
- AuthorPosts
- May 7, 2020 at 7:50 am #27155
That is actually very helpful. Maybe this variation:
Best,add_filter( 'asp_results', 'asp_custom_images_gr', 10, 4 ); function asp_custom_images_gr( $results, $id, $is_ajax, $args ) { global $WCFM, $WCFMmp; foreach ($results as $k=>&$r) { if ( $r->content_type == 'user' ) { $store_user = wcfmmp_get_store( $r->id ); $r->image = $store_user->get_avatar(); } } return $results; }
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 7, 2020 at 10:50 am #27159It works ! Perfect as usual ! Thank you so much 🙂
May 7, 2020 at 3:50 pm #27165One last question (i hope for you :))
How can I add in the custom code for displaying user metas in product search a metadatas included in another one. For example if i want to display the content of _enable_local_pickup wich is in _wcfmmp_shipping_by_distance => array etc._wcfmmp_shipping_by_distance
array (
0 =>
array (
‘_default_cost’ => ”,
‘_max_distance’ => ”,
‘_free_shipping_amount’ => ”,
‘_enable_local_pickup’ => ‘yes’,
‘_local_pickup_cost’ => ‘5’,
),
)May 8, 2020 at 9:08 am #27180Well, this is more difficult, it cannot be used via the advanced title/content fields. This requires a completely new custom code.
Best,
Unfortunately I cannot custom code this one for your, as it is very specific of what and how do you want to display. This tutorial and the previous codes could be a good start on how to do it.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 8, 2020 at 11:04 am #27186I understand that. Thanks for everything. Have a nice Week End
- AuthorPosts
The topic ‘Use of users custom fields in a product search’ is closed to new replies.