Tagged: search
-
AuthorPosts
-
February 14, 2014 at 10:56 pm #224197
Hey Guys,
So I was talking with Swiftype and their solution would work perfectly, but basically, I need to disable the theme’s ajax search function while leaving the search box enabled/present. From there, embedding the following code in the footer would leverage the search box…can you tell me where i do this in the php files?
<script type="text/javascript"> var Swiftype = window.Swiftype || {}; (function() { Swiftype.key = 'EeQjiyzuVo7taNSHZzYs'; Swiftype.inputElement = '#searchform input#s'; Swiftype.attachElement = '#searchform input#s'; /** DO NOT EDIT BELOW THIS LINE **/ var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true; script.src = "//s.swiftypecdn.com/embed.js"; var entry = document.getElementsByTagName('script')[0]; entry.parentNode.insertBefore(script, entry); }()); </script> <style> #st-overlay-search-input { border: 0; padding: 0; width: 100%; } </style>
February 15, 2014 at 1:40 am #224228Hey Mark!
You can show them the filter and function example we’ve done for Relevanssi which should help in adding something else to replace it: http://kriesi.at/documentation/enfold/use-relevanssi-in-search-instead-of-the-default-search/
Best regards,
DevinFebruary 15, 2014 at 8:42 pm #224390In the Relevanissi example, where in functions-enfold.php would you comment out the existing search function and replace it with this? Did I miss that in the link above?
Thanks, Devin!
February 15, 2014 at 11:09 pm #224422The function doesn’t replace the theme function. It filters the themes search (avf_ajax_search_function) with your own function which then your search function is used instead.
February 20, 2014 at 3:43 am #226539Hi Devin,
I guess I’m not clear where that code would be placed, or where Swiftype would add code similar to that? I just need the Enfold search box to use an engine that can provide results from both my main domain and subdomain, and the subdomain isn’t wordpress…any other ideas to simplify this?
February 20, 2014 at 4:29 am #226563The best thing would be to talk to a freelance developer if you aren’t sure what steps to take next. The filter allows you to replace the search function with your own but the implementation of one beyond the WordPress search is beyond what we can do through support.
-
AuthorPosts
- You must be logged in to reply to this topic.