Blocs 'Site Search' Not Working

Hello, I’m always grateful for the help from all of you.

While building my website, I purchased the ‘site search’ from the Blocs website store and added it as a bric. I was pleased to see how convenient it was.

The issue is that the search function works in the Blocs app preview, but after exporting it as a WordPress theme and applying it on WordPress, the site search doesn’t work no matter what I input.

I’ve seen similar posts about this in the past, but I couldn’t find a solution, so I’m reaching out again. Is it not possible to implement with a WordPress theme? If there are parts that need to be modified, what should I try?

Please respond urgently.
Thanks in advance.

Does it only work with bootstrap 4?

I’ve resolved the issue, and here’s how:

When I exported the CMS to WordPress, I noticed that the site-search-data.json was not being generated.

So, I tried exporting the CMS without any settings, and the site-search-data.json appeared. I then created a top-level JS folder and placed the file there, and it worked perfectly.

It seems tedious to do this every time. It would be great if it could automatically generate when exported to WordPress… Is there any way?

Thank you for reading my lengthy post.

I always receive a lot of help from the community.

Cheers to all developers!

4 Likes

Nice find @Jerry32. @Norm might be a simple patch to include in one of the next beta releases?

4 Likes

I’m interested to know why you would use the site search Bric with a Wordpress theme, search comes with Wordpress this guide explains how to implement it.

Site search is intended for static websites, I actually have some fixes and improvements coming to that Bric today and system today. I’ll consider adding support to generate the data file, it would be great to know which pages you included in the search that are not Wordpress theme template files?

2 Likes

Check the Blocs site search feature is compatible with the WordPress theme you’re using. It’s possible that there could be conflicts between the Blocs-generated code and your WordPress theme. Check this out Blocs Academy - Building a WordPress theme – Search Integration