Custom URL query parameters

Hello Frontity! Im having a bit of a love/hate relationship with you atm. Some things are super easy and work well, others not so much.

Im trying to do something I thought would be incredibly easy, add a custom URL query parameter to my actions.source.fetch request. Its proving to be extremely frustrating.

I have a custom rest query hook ( set up on wordpress that I would like to use to filter a custom post type endpoint’s response. Every time I try to do this using actions.source.fetch the custom URL parameters get stripped.

Please help!

Hi @jack.templeman.user1

Welcome to the Frontity community. Can you provide a code sample, or better still a link to a repo, so that we can see what you’re trying to do. Thanks.

Hello @mburridge,

Thanks for the welcome and apologies for not getting back to you sooner. Deadlines, etc.

What I am trying to achieve is retrieve a filtered list of people that belong to a particular business from my Wordpress API. I have the filter set up on Wordpress and its working as intended. However, when I go to request these filtered results like the below and review the request my Wordpress API receives, it appears Frontity strips the ‘businesses’ URL query.


In the end, I used Frontity’s ‘fetch’ function in useEffect. This works, but ideally I wanted that data already available on the server ready for SSR.

Kind regards,


Hi @jack.templeman.user1

In that case use a beforeSSR action. Documentation is here, and here is an example of it’s usage.

Hope this helps.

Hello @mburridge,

Completely understand the above. This is where I was trying to grab data before.

However, the issue is with Frontity stripping the custom url parameters.

For example:

beforeSSR: ({ state, libraries, actions }) => {

Produces the following request to the API:


When I would expect:


Thank you for looking into this!