forked from LiveCarta/LiveCartaWP
Merge pull request #6557 from Jerryby/wordpress
home page early redirect
This commit is contained in:
@@ -34,6 +34,20 @@ $scripts = [];
|
|||||||
var isHomeTemplate = true;
|
var isHomeTemplate = true;
|
||||||
</script>
|
</script>
|
||||||
<?php endif;?>
|
<?php endif;?>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
(function(){ // early redirect if needed
|
||||||
|
|
||||||
|
if (typeof frontSettings === 'undefined' || frontSettings.isGuest) return;
|
||||||
|
|
||||||
|
if (typeof isHomeTemplate != 'undefined' && isHomeTemplate === true) {
|
||||||
|
var urlParams = new URLSearchParams(window.location.search);
|
||||||
|
var redirectGetParam = urlParams.get('law') ? '?law=1' : '';
|
||||||
|
window.location.href = lawCartaDomain + '/dashboard' + redirectGetParam;
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
|
||||||
<?php $scripts[] = ['type' => 'script', 'source' =>"https://www.googleoptimize.com/optimize.js?id=OPT-TCXZSGK"]; ?>
|
<?php $scripts[] = ['type' => 'script', 'source' =>"https://www.googleoptimize.com/optimize.js?id=OPT-TCXZSGK"]; ?>
|
||||||
<?php if (LAWCARTA_ENVIRONMENT_NAME == 'prod'):?>
|
<?php if (LAWCARTA_ENVIRONMENT_NAME == 'prod'):?>
|
||||||
<?php $scripts[] = ['type' => 'comment', 'source' =>'Google Tag Manager']; ?>
|
<?php $scripts[] = ['type' => 'comment', 'source' =>'Google Tag Manager']; ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user