I have created a custom header.phtml file to make my custom header. See https://prnt.sc/r7dtnu Now I want to add Sign in and Create an Account link in this. How can I add here?

  • You want the <a href> for both links, right? Feb 25, 2020 at 12:25
  • yes.. how it works for default. The same way
    – Nafsss
    Feb 25, 2020 at 12:32

2 Answers 2


You can simple add using anchor tag in your header phtml file.

<a href="/customer/account/login">Sign In</a>
<a href="/customer/account/create">Create an Account</a>

You can use the below code to add the links to your custom header.phtml file

<a href="<?= $block->getUrl('customer/account/login'); ?>"><?= __('Sign in') ?></a>
<a href="<?= $block->getUrl('customer/account/create'); ?>"><?= __('Create an Account') ?></a>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.