Last active
March 8, 2022 06:13
-
-
Save drewbaker/2e68e0675b377ad68ec0355adef1dc90 to your computer and use it in GitHub Desktop.
Shopify redirect header
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// Redirect from the Shopify site (except for any account or cart pages) | |
switch(true) { | |
case document.location.href.includes('/cart') : | |
case document.location.href.includes('/account') : | |
break; | |
default: | |
window.top.location.href = 'https://shop.example.com/'; | |
break; | |
} | |
</script> | |
<style> | |
// Hide the search icon on the login/account pages | |
.site-header .icon-search { | |
display: none !important; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment