MyListing Club

Redirect After Listing Submission

Building better MyListing websites. One code snippet at a time.

Overview

The Redirect After Listing Submission code snippet helps with the overall user experience of a MyListing website.

If you want to send customers to a custom thank you page, run them further down your sales funnel, etc., then this snippet is for you.

Implementation

  1. Grab the code snippet.
  2. Follow the provided instructions.
  3. Save your changes.
				
					//// INSTRUCTIONS: 
//// Copy and paste the code snippet below into the child theme's functions.php file.
//// You can edit the functions.php file from the WordPress Dashboard (Appearance > Theme Editor) or via FTP.

--------------------------- CODE SNIPPET IS BELOW THIS LINE --------------------------- 

add_action( 'mylisting/submission/done', function( $id ){
   ?> <script type='text/javascript'>window.location.href='https://your-url-goes-here'</script> 
   <?php
}, 99, 1);