Add Search bar to website

I’m curious if there are any plugins, 3rd party applications, or future features that would allow us to add a search bar to sites we create with divhunt, that would allow website users to search the website. I’ve found this plugin/embed https://app.sitesearch360.com/ which searches and crawls my site perfectly returning excellent search results, however much like another embed i’ve tried https://pagenudge.com/ it doesn’t seem to work with Divhunt CMS. It doesn’t seem to matter if I put the embed inside an embed element type on the page itself, or in the extra code area of the settings tab to place it at the bottom of the header code. I’d love to know if anyone has a workaround, or knows why certain embeds don’t work with Divhunt, or if anyone else has successfully added a search bar to their Divhunt websites. Thank you in advance.

Hey, can you give me some page where you tried implementing that 3rd party search, so I can try to troubleshoot why it is not working in embed?

@Pakic Hey, I managed to get the search working on my site (webonized.com). Not sure what the issue was but I tried it again this morning and it worked. I still have not managed to get the pagenudge embed to work yet though (a video overlay embed), still struggling with that. I’ll hit you up eventually again if I still don’t make any progress on that. Thanks for the reply :slight_smile:

@Glenn

We use “sources” system to retrieve dynamic data.

This solution requires from you to understand JavaScript and callbacks.

$dh.sources() will return you all sources available.

So for example in my list “collection.182” is my blog collection, so I can do something like

$dh.source('collection.182', {search: 'some search term'}, [], '', {}, function(data)
{
    console.log(data); // Gives me all results found
}}, 

So in this way you can filter multiple CMS and get the results.

1 Like

@dejan Dejan, it’s working out of the box :slight_smile: no code needed. I do understand JS and callbacks, but I’ve mostly programmed in server side PHP, and on the front end dealt with ADA compliancy, CSS, and Jquery, although I do know raw JS just not as well. I thank you for the reply. I got it working as I posted in the comments. You can see and test the search bar on my website webonized.com It’s a pretty cool little plugin/embed I have to admit, the reason it wasn’t showing for me was a fault of my own in setting up the embed within their own interface, I wasn’t returning data to a div so it had no where to display. It works good enough for what I wanted which was a straight out the box solution.