Run function on initial wordpress page request

[ad_1]

edit: Title should be **Run function on all wordpress page requests**

​

Hi,

I want to run a function before a wordpress page loads. The function will send a get request to an external source. The api response will then dictate which page a user sees. i.e will rewrite the url

Question, is this possible in wordpress, if so how please? Or is this something that should be done in the CDN?

Thanks a bunch!

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer