How can I set up a conditional redirect on my homepage?

I need to figure out a code to add to the homepage of a Shopify website.

We have two websites. One on Shopify which is a clothing brand (Angler Woods) then one on a Wordpress site which is the screen printing company that makes those and other apparel (Something Beautiful).

I have everything on the Shopify backend showing Something Beautiful so when they checkout it’s under the actual parent company. Shopify has “Buy Now” buttons you can add anywhere to buy and checkout. We want to put these on other sites. Essentially making it where we have multiple brands and sites for them but one checkout.

The only problem is that the logo on the checkout pages takes you to the main page of the Shopify page which is Angler Woods. Shopify doesn’t let you change that. It’s going to confuse customers that buy one brand and are taken to another’s site.

My solution is to set up a redirect in JS or that if sent there from the checkout url it instantly redirects to Something Beautiful since it’s the parent company. I tried the below codes without luck.


Also looking for a way to redirect my homepage to another page on my site.

Does anyone have any ideas or solutions?