"Allow customers to log in from the header of online store and at checkout" opening new page

Topic summary

A user enabled the “Allow customers to log in from the header of online store and at checkout” option but encounters an issue where clicking the login icon in the header opens a new tab instead of the same window.

Proposed Solution:

  • Edit theme code via Online Store > Themes > Actions > Edit code
  • Locate the header file (typically header.liquid or in the Sections folder)
  • Find the login link and modify or remove target="_blank" attribute (change to target="_self" or remove entirely)
  • Check for JavaScript that may control link behavior and inspect custom scripts related to header/login

Current Status:
The original poster is using the Canopy theme and reports being unable to locate the specific code to modify in header.liquid. The issue remains unresolved and requires further troubleshooting specific to this third-party theme.

Summarized with AI on November 4. AI used: claude-sonnet-4-5-20250929.

Hi,

I enabled “Allow customers to log in from the header of online store and at checkout” on Customer Accounts page and I am using “Customers log in with a one-time code sent to their email (no passwords)” option.

When a user tries to login by clicking the icon on the header, it is opening a new tab.

We do not want login to open a new tab.

How to open Register / Login on the same window?

Thanks

To ensure the login opens in the same window on your Shopify store, follow these steps:

  1. Edit the Theme Code:

    • Go to Online Store > Themes in Shopify.
    • Click Actions > Edit code for your active theme.
  2. Locate the Header Section:

    • In the theme editor, find the header file (often header.liquid or within the Sections folder).
  3. Modify the Link Attribute:

    • Look for the login link and ensure it does not include target=“_blank”. Change target=“_blank” to target=“_self” or remove it to open in the same window.
  4. Check for JavaScript:

    • Some themes use JavaScript to control link behavior. If the problem persists, inspect any custom scripts related to the header or login.

This should resolve the issue! If you’d like more conversion-focused solutions, our Debales AI Sales Agent can help boost engagement by guiding customers through the shopping experience.

Enhance your artist pages with smart guidance from the Debales AI Chatbot on Shopify! Ready to help users find what they need—let’s chat!

If this answer helped, please kindly Like and mark it as the accepted solution!

Hi,

Thank you for your reply.

I could not find the code to replace on header.liquid.

I am using the theme - https://themes.shopify.com/themes/canopy

Thanks,

Paul