Wordpress routing, open link and trigger function instant js

Hi there,

I’m working on a custom implementation for Algolia in Wordpress but have a small issue.
I’m displaying results in a custom DIV and using JS version.
When you enable routing it gives me a link like:

HTTP://web-address.com/?index_name query D=

The first question is if can I change index_name to something custom.

Next, when I copy search link generated by routing and open in a new tab I want to display my search results. This will be ok if everything would be on one page but I need to display my custom DIV.

How can I pass search results link to create within it a new function? I couldn’t find anything in the documentation.
First I was thinking about document ready and pathname but this is a tricky one.
Can someone suggest a different solution because I’m scratching my head around this for a few hours and can not think about best solution for that.
I have everything ready but this part isn’t.

Thank you

Hi @robertzoone,

I think this documentation about routing urls may be helpful.

This section of the documentation explains how to manipulate the urls.

The documentation is specifically for SEO, but should give you some ideas on how to do what you are trying to achieve with the urls.