Forum Replies Created
-
AuthorPosts
-
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterThe new form it creates will have the properties imported from the lite version – the design, settings etc..
The Pro version supports multiple search forms so at least one has to be created. The import method will create a new form from the lite version using the lite version options.Ernest Marcinko
KeymasterHi!
Sure!
Make sure to enter a form name to this field and then hit the import button. That will do the trick 🙂
June 19, 2023 at 2:06 pm in reply to: Results suggestions – how to add more than post tile in the results #44365Ernest Marcinko
KeymasterSure, no problem!
Generally I recommend looking at the hooks section of the knowledge base, most hooks are documented there.
Relationship fields should be indexed automatically when using the index table engine. It is not a 100% support unfortunately, so you will have to test, as every relationship field is a bit different. Generally speaking the plugin will try to fetch the values.
If you want to do some manual stuff to add to the index, then I would recommend using this hook. This one triggers whenever a post content is being indexed, right before it’s passed to the tokenizer. You can use this hook to change/add text to the content field. Generally it is a good execution point to add contents from custom fields or whatever field you wish, then the plugin will take care of the rest.
June 19, 2023 at 1:00 pm in reply to: Results suggestions – how to add more than post tile in the results #44363Ernest Marcinko
KeymasterHi,
Thank you for your kind words!
Well, if the state_code exists on both post types, then it will display unfortunately for both, there is no conditional logic to that in the options.
However, this might be better to solve programmatically instead of using the advanced title/content fields, as if you change your mind or want to make it more complicated it will get worse.
Try adding this code via the Code Snippets plugin or to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.
add_filter( 'asp_results', 'asp_custom_link_meta_results', 10, 4 ); function asp_custom_link_meta_results( $results, $search_id, $is_ajax, $args ) { // Change this variable to whatever meta key you are using $meta_key = 'state_code'; $post_type = 'cities'; // --- no changes below foreach ($results as $k=>&$r) { if ( isset($r->post_type) && $r->post_type == $post_type ) { if ( function_exists('get_field') ) $state_code = get_field( $meta_key, $r->id, true ); // ACF support else $state_code = get_post_meta( $r->id, $meta_key, true ); if ( !empty($state_code) ) { $r->title .= " " . $state_code; } } } return $results; }I this code I assumed the post type name is
citiesand the meta field name isstate_code. You may have to adjust that on lines 5-6 to make sure it is correct.If you need help with the code let me know, I will add it for you.
Ernest Marcinko
KeymasterHi,
1 & 2) By default the plugin does not exclude items which does not have connection to the filtered taxonomy. In most cases this is expected behaviour, but it can be changed.
In you case I suggest this configuration: https://i.imgur.com/hOUaM7S.png
You can try playing around with these options a bit to get as close to the desired results as you need.3. Checking your configuration I believe the match is very likely found within the content field. If the result is there it must match somewhere from the selected fields. Try turning off the search in content (or use a filter for it if needed) to disable content searches.
4. By default when hitting the magnifier and return button the plugin redirects to the default WordPress theme results page. You can turn that off here.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterDuplicate topic of this, we will continue there.
-
This reply was modified 3 years ago by
Ernest Marcinko.
Ernest Marcinko
KeymasterYou cannot access this content.
June 17, 2023 at 11:11 am in reply to: Returning categories without directly assigned products to them #44341Ernest Marcinko
KeymasterYou cannot access this content.
June 17, 2023 at 10:52 am in reply to: Search results page showing javascript errors when filters are enabled #44340Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
Ernest Marcinko
KeymasterYou cannot access this content.
-
This reply was modified 3 years ago by
-
AuthorPosts