In functions.php is it possible to dynamically set the static home page?
The condition could be anything, but for example by domain:
if ( $_SERVER['HTTP_HOST'] == 'domain-one.com' ) set_front_page_slug('domain-one-home'); else if ( $_SERVER['HTTP_HOST'] == 'domain-two.com' ) set_front_page_slug('domain-two-home');
Note that it should not permanently change the home page set in the WordPress Settings, only for the current page load. I want different visitors to see different homepages.
Any approach welcome that can neatly override the default home page.