Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › 3 questions: author field, layout organization, and more!
- This topic has 21 replies, 2 voices, and was last updated 2 years, 7 months ago by
Ernest Marcinko.
-
AuthorPosts
-
November 21, 2022 at 6:23 am #40047
TOM The Open Market
Participantfirst 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 #40067Ernest Marcinko
KeymasterHi 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.
November 26, 2022 at 4:53 am #40162TOM The Open Market
ParticipantYou cannot access this content.
November 26, 2022 at 9:11 pm #40170TOM The Open Market
ParticipantYou cannot access this content.
November 28, 2022 at 5:36 pm #40219Ernest Marcinko
KeymasterHi 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.
November 28, 2022 at 6:21 pm #40221TOM The Open Market
ParticipantAh, 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 #40246Ernest Marcinko
KeymasterYou are welcome Jon.
Make sure to turn off these settings here: https://i.imgur.com/cdoNHbl.png
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.November 30, 2022 at 12:34 am #40281TOM The Open Market
ParticipantAh, beautiful. Thank you
December 2, 2022 at 4:50 pm #40366TOM The Open Market
ParticipantMorning!
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 #40367TOM The Open Market
ParticipantAnd, 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 #40375TOM The Open Market
ParticipantYou can ignore the last two queries.
This plugin is badass, lol.thanks for the help
December 3, 2022 at 4:04 am #40376TOM The Open Market
ParticipantHa! 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 #40397Ernest Marcinko
KeymasterHi! 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.
December 15, 2022 at 5:47 am #40520TOM The Open Market
ParticipantHi!
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!
JonDecember 15, 2022 at 5:25 pm #40526Ernest Marcinko
KeymasterHi 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.
-
AuthorPosts
- You must be logged in to reply to this topic.