Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › 3 questions: author field, layout organization, and more!
This topic contains 14 replies, has 2 voices, and was last updated by Ernest Marcinko 1 month, 2 weeks ago.
- AuthorPosts
- November 21, 2022 at 6:23 am #40047
first off, this plugin is excellent! I’m quite pleased.
1. at settings > layout options > results layout… > results fields > author I’m wondering if there’s any way to set the Author Field to show a particular taxonomy instead of the display or login options? Particularly, I’m running a multivendor site, using the “Woocommerce Product Vendors” plugin that sorts the vendor names by the taxonomy: [wcpv_product_vendors]. The issue I’m having is that the display name, login info, and vendor name are all different and the rest of the site is set up to have association with the vendor name, specifically. Is this possible?
2. I had other questions, but I answered them myself as I was writing them down. I’m really stoked on this plugin. I had sent in a refund request in haste, but I’d like to cancel that, if I may?
Thanks for the help!
Jon
November 21, 2022 at 4:43 pm #40067Hi Jon,
Thank you very much for your kind words!
1. If I may suggest, then try the advanced title and content fields feature for this. You can add taxonomy terms, custom fields and custom HTML to the content field without actually coding anything.
The second best option is custom coding, but if you can manage with the advanced fields, it would not be neccessary.2. It’s all right, we already cancelled the refund as per your request.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
November 26, 2022 at 4:53 am #40162You cannot access this content.November 26, 2022 at 9:11 pm #40170You cannot access this content.November 28, 2022 at 5:36 pm #40219Hi Jon,
The vendor results are taxonomy terms if I understand correctly, and you would like to display associated term metadata with them. I’m afraid there is not option to do that. The only option is to use custom code, but it is not very easy, you will have to know the meta keys and construct a custom code. This is the base code I recommend:
add_filter('asp_results', 'asp_get_term_metadata'); function asp_get_term_metadata($results) { $keys = array("meta_key1", "meta_key2"); foreach($results as $k=>&$r){ if ( $r->content_type == 'term' && empty($r->image) ) { foreach ( $keys as $key ) { $value = get_term_meta( $r->id, $key, true ); if ( !empty($value) ) { $r->content .= ' ' . $value; } } } } return $results; }
The $keys array should contain the term meta names – these should be the keys for the location etc.. The code then fetches the values and appends them to the content field.
Unfortuantely filtering by geolocation/proximity is not possible.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
November 28, 2022 at 6:21 pm #40221Ah, I was afraid I’d need to rely on custom coding. Not my wheelhouse. Thanks for the base code to start with! I’ll pass that on to the brave soul I hire to code for me.
One last question:
Before Ajax, I was using a search bar (search in place) on specific pages (FAQ, especially) that would only search the page the shortcode was placed on to, and it would just highlight all of the results on that page (ctrl+F for mobile, and old people).
If Ajax can be setup to do the same thing, I’d like to use Ajax for this purpose. Otherwise the issue is that Ajax overpowers the other plugin’s shortcode ( [search-in-place-form in_current_page=”1″] ). When Ajax is activated it the shortcode turns in to my [wd_asp id=1] ajax search bar. When Ajax is deactivated, the issue is resolved.
Baffles me!
Thanks again!
Jon
November 29, 2022 at 10:46 am #40246You are welcome Jon.
Make sure to turn off these settings here: https://i.imgur.com/cdoNHbl.png
Best,
My guess is, that the search in place is also using the same output injection method, so one automatically overrides the other. If that option is turned off, then ajax search pro will not try to replace the default search bar.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
November 30, 2022 at 12:34 am #40281Ah, beautiful. Thank you
December 2, 2022 at 4:50 pm #40366Morning!
Is there a way to set up the Advanced > Grouping Options to group a search result based off of a custom field (post or user meta) instead of taxonomies?
Thanks!
December 2, 2022 at 5:06 pm #40367And, last time I created a custom field for post meta it didnt show up immediately in the frontend search settings, but now it is. Its been several days since I created the post meta, but I havent messed with any relevant search or meta settings since.
I just duplicated the custom fields and changed the names of them, and its not currently showing up in the front end search settings custom field selector.
Is this something that takes a while, or do you suppose there’s something to be toggled to make this new post meta show up?
December 3, 2022 at 3:30 am #40375You can ignore the last two queries.
This plugin is badass, lol.thanks for the help
December 3, 2022 at 4:04 am #40376Ha! My mistake. I’m still curious about this one:
Is there a way to set up the Advanced > Grouping Options to group a search result based off of a custom field (post or user meta) instead of taxonomies?
I appreciate your patience!
December 5, 2022 at 1:56 pm #40397Hi! Thank you for the kind words!
Is there a way to set up the Advanced > Grouping Options to group a search result based off of a custom field (post or user meta) instead of taxonomies?
Unfortunateny no, that is not possible. I would recommend a custom code snippet to get around this, but that is way more complicated than that.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
December 15, 2022 at 5:47 am #40520Hi!
Is there any way to hide Frontend Search Setting terms based off of what is selected?
I’ve attached a photo of my Frontend Settings for reference. (the Town, Categories, and Vendors all have drop down menus when you click their search bar)
An example would be: if the user were to select Goods, or Services, or any of the Town/Categories/Vendor selections on the Frontend Settings – then only the terms associated with shared products would remain.
EG – if you select Services, only the towns, categories, and vendors with metadata: Services would show.
EG – if you select a town from the drop down list, then only terms associated with that town would show in the Categories/Vendors selections, etc, etcThis way the user wouldn’t be selecting terms that kind of led nowhere.
I hope this makes sense!
Thanks!
JonAttachments:
You must be logged in to view attached files.December 15, 2022 at 5:25 pm #40526Hi Jon,
Unfortunately this is not yet possible – but it is on the future updates horizon. Right now we are a bit overwhelmed by the code reworks, but once we get everything in place, the new features will be coming faster.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.