Setup Question

This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 1 year, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #33526
    BrianaCap49
    BrianaCap49
    Participant

    Hi, Not sure if you’re able to help us with the below or if we need to order a job for it but we’re trying to set the plugin up so that:

    1. If someone searches “dogs” it will include wherever we have the word “dog”. Right now it’s extremely touchy and only searching the exact word it seems. So will not bring up anywhere we have the word dog in the results since the search keyword was plural “dogs”.
    2. Are people able to search using phrases/questions? It seems people can only search by 1 or 2 keywords right now. We’re worried people will type an actual question in to the search box and the plugin won’t recognize anything (example: does swyfft have a dog list).
    3. One of the ways we want the result(s) to show up is on our FAQ page in the actual drop down boxes on the page where we have our answers. Right now it brings you to the page and will highlight, but won’t drop down the actual box showing where the result may be in there.

    Are you able to assist us with the above or point us in the right direction to set the plugin to act accordingly?

    Thank you!

    #33532
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    1. For that, you can change the keyword logic. Try the “AND” or the “OR” logics, those are for fuzzy matches, without matching the whole keywords.

    2. I’m afraid this is way beyond the plugins capabilities. Basically anything the user enters is considered a search against phrases within the selected fields. Regocnigzing meaning beyond questions and finding mathes intuitively would require some sort of AI. However, if you use the “OR” logic, then matching even some of the keywords partially is sufficient for a match, which sort of can bring up some of the desired results.

    3. This definitely requires custom coding. It should not be too difficult though in my opinion, if the keywords are already highlighted.
    I might be able to suggest something, but I need a bit more information. Can you please send me a link to a page where the search shortcode is active? Also a search phrase I should try that brings up a FAQ where the keyword is highlighted within a section, which should be opened. Thank you!

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #33553
    BrianaCap49
    BrianaCap49
    Participant

    Hi Ernest,

    Thank you for the response! Here is the link to a test page where we have the search plugin: https://agentresources.swyfft.com/test/.

    Search:
    Ivans –> click on the 2nd result that displays, which is “FAQ”.
    You’ll notice it brings you down on the page to wherever Ivans is located, however it does not open the dropdowns where it is also located.

    You’ll also notice if you search for “payments” and click on the FAQ result page, it highlights the first box where we have the word “payments”, however if you open the one directly next to it, the word payments is also in there and should drop down, yet doesn’t unless you open it. Once you open it manually, that’s when you see the word highlighted.

    Thank you for looking into this for us!!

    Please let me know if you need anything else from me or have any other questions.
    Briana

    #33556
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Thank you, this should be sufficient.

    Try adding this code 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_action('wp_footer', 'wp_footer_add_js_opener');
    function wp_footer_add_js_opener() {
    	?>
    	<script>
    	(function(){
    		setTimeout(function() {
    			document.querySelectorAll('[class*=asp_single_highlighted]').forEach(function(el){
    				el.parentElement.click();
    			})
    		}, 2500);
    	}())
    	</script>
    	<?php
    }
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.