This article only applies to the old designer. Not sure which designer you have? Check here.

By default, when a customer logs out of their account, they'll be taken to the main page of your shop. If you want them to be sent to a different location, you can use the Code Editor to change the log out link.

1. Find the log out link in the Code Editor

The log out link can appear in different files depending on your theme. Usually it's either in base.html or header.html.

Additionally, there are usually two log out links: one which appears in the upper righthand corner, and one on the main navigation bar. In both cases, what you're looking for should be along the lines of:

<a href="/customer/logout">
  Sign Out
</a>

2. Update the link code

You're going to change the link from just going to /customer/logout to instead go to your target location after sending a separate request to the logout page:

<a href="/customer/logout">

New code:

<a href="https://www.google.com/" onclick="$.ajax({url: '/customer/logout',type: 'GET',success: function(response){;}});">

Change "https://www.google.com/" to be wherever you want customers to end up.

3. Test it!

It's easy to make a seemingly innoculous typo and end up with a broken log out link. Log in to your store (you can use your merchant account credentials as if you're a customer) and test each log out link, making sure that it does in fact log you out, and takes you where you wanted.

If you've done the above steps and can't find any typos, but it's not working properly, email [email protected] and we can take a look at what's going on.