Frontity Embedded Mode: Passing Data from WP to Frontity (GeoIP)

So I’m implementing Frontity in Embedded mode and I am using the WP Engine - GeoTarget plugin.

Basically it gets the IP etc from the PHP request its happening. However, since I’m in embedded mode,

When I query the endpoint which returns the GEOIP data from Frontity, it will query from the frontity server instead of the client.

So what is the best way for me to first, get GEOIP data from WP before hopping on to Frontity to pass that data?

Thanks!

I was able to resolve my issue by just modifying the frontity-embedded plugin.

I updated template.php and added my code in. Idea for future ideas is to add WordPress custom hooks into the template.php file so we can inject code using add_action.

Hey @francis, I’ll gladly review and merge a PR that contains additional filters or actions :slightly_smiling_face: