Best Practice for re-using API Data in WordPress?

I’m using an API which is accessed with ID/Secret, etc. and use it in different widgets. In each widget however, I’m repeating the entire JSON process (i.e. file_get_contents, decode, etc.). I can’t help but think this must be slowing the entire process down.

What would be the best way of going about only calling this API once and then grabbing various data from it in different widgets, theme components, etc.?

Read More

Thank you!

Noel

Related posts

Leave a Reply

1 comment