Using if statement in Functions.php file
-
I have a snippet of code that I’d like to use to generate two different outcomes. If the user is on page 1, I want the function to point them to the delivery page. If they are on the delivery page, I want the function to point them to a thank you page. Here is the code that points them to page 2:
function app_redirect( $script ){ return str_replace("window.location.href=app_location()", "window.location.href='https://islandfreshlaundry.com/dev/delivery/'", $script); } add_filter( 'app_footer_scripts', 'app_redirect' );
How can I modify that so that it continues to function as is on page 1, but has a different redirect from the delivery page?
Hope that makes sense…
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Using if statement in Functions.php file’ is closed to new replies.