How can I remove visible code from my screen after account creation redirect?

Hi. I’ve been navigating through my new shopify store trying to figure things out and after adding a code to redirect the page after a customer creates an account through theme.liquid, which works great, but a code shows up on the actual website. How can I get rid of this without getting rid of the code to redirect the customer to a new page? Thank you!

Hi, @Neha_28

You probably forgot to add a somewhere.

On an important side note, you’re using jQuery on what seems to be one of the free Shopify themes for Online Store 2.0; none of them are compatible with jQuery, plus jQuery is outdated nowadays. To put it simply, jQuery makes websites underperform and slow down.

Adding jQuery to a theme without the library included will break all Javascript code in the website as well, so please be mindful of that.

To remove that piece of code, you can try this:

  1. Download this Google Chrome Extension: (you need to use Google Chrome): https://chrome.google.com/webstore/detail/shopify-theme-file-search/mhchmhfecfdpaifljcfebnlaiaphfkmb
  2. In your Shopify Admin, go to Online Store > Themes > Edit Code
  3. In the new box that appears with the extension (top right corner) search for the code you want to remove. You can search for something like:

#create_customer

  1. Delete this piece of code from the files it shows up.

Let me know how it goes.

Kind regards,
Diego

Hi Diego,

Thanks for responding. I downloaded the extension and deleted the " #create_customer” from the files it was in. The website hasn’t changed and is still showing the same code at the bottom of the screen

Hi @Neha_28 ,

You shouldn’t delete only the word “#create_customer”, I used it just as a keyword to find where the code is located. Please make sure you delete all the custom code you have added.

So, according to your screenshot, you should delete everything from jQuery to the characters });, and all that is in between as well.

Hi @diego_ezfy ,

Sorry I am a bit new to this. I’ve deleted the code that I added and its still not changing? The code is still showing at the bottom of the screen.

I actually can use a previous draft of mine which is the same as the current website that I’m having issues with, but there is not jQuery or the code showing up at the bottom. Is it safe if I use this? And how can I add a code that redirects the page to a thank you page after a customer creates a new account?