How to set and use global variables? Or why not to use them at all
While I strongly advise against this, and it will not speed things up, your usage is incorrect. WordPress already caches these things in the object cache/memory so it doesn’t have to fetch it multiple times in the same request, you don’t need to store the result and reuse, WP does that already out of the … Read more