The team is now working on the WordPress Interactivity API. This unblocks the same UX Frontity framework enabled but directly in WordPress Core, fully compatible with the new Site Editor.
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 (https://developer.wordpress.org/reference/hooks/rest_this-post_type_query/) 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.
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.
jack.templeman.user13
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,
Jack
mburridge4
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.
jack.templeman.user16
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.