Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #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';
      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);
    #st-overlay-search-input {
      border: 0;
      padding: 0;
      width: 100%;

    Hey 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://www.kriesi.at/documentation/enfold/use-relevanssi-in-search-instead-of-the-default-search/

    Best regards,


    In 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!


    The 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.


    Hi 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?


    The 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.

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

You must be logged in to reply to this topic.