put WP autosearch plugin in the header

Hi! I am wondering if you could help me achieve what my clients want. I am not a web developer, just a web designer so I don’t want to mess up the theme.

Here is the thing: my clients wanted a search box that showcases the products and posts when you type in first few letters. I found that with plugin WP Autosearch. For now I simply set display: none on the theme search box so I don’t have two search options.

Now I’m simply wondering if there is a way I could place that new WP Autosearch box on the header, exactly where the default search box from the theme is placed? If you could tell me what should I do, I’d be grateful.

In case you need it, here is the login to my client’s website:

https://www.matica-hrvatska-dubrovnik.com/wp-admin/

username: zeze88
password: surlacommunity2017

Thank you!

Hello there,

I hope you are doing well today.

You would have to use the php short-code in the header php template. This seems to be the php code:

<?php wi_autosearch_suggest_form(); ?>

You would have to go to Appearance > Editor > Theme Header and paste the code there.

I would recommend that you backup the site and use a child theme to make the changes to the code. These plugins will help:

Best Regards,
Support

Thank you for such a quick reply.

I tried but it didn’t work unfortunately.

I posted the code in the child theme of the header.php - just before the <?php endif; ?>

Hello there,

Try pasting it at the bottom of the file so that it will not affect any of the other code.

Best Regards,
Support

Tried it and I get this error:

Call to undefined function wi_autosearch_suggest_form()

I guess it is not possible but thanks for trying!

HI Zeze

Sorry but, this is not the theme related problem now, get in touch with the plugin provider for more detailed implementation guide or support
Thanks

Thats ok, thanks for trying. I found another plugin that helped me achieve exactly what I need so I didn’t even need to touch the search bar box.

Hello there,

Nice work finding a solution.
Please feel free to contact us again in the future regarding any other issues.

Best Regards,
Support