Minimal theme remove create account

Tourist
10 0 2

how to remove "create account and Log in" from home page banner in minimal theme?  and add to footer?

thanks

1 Like
Shopify Partner
1843 170 537

If you go to Online Store > Navigation you will find 2 menus named Main menu and Footer menu. You can edit these to set what pages, collections etc. get shown where and so on.

 

Hope this helps!

I turn coffee in to code - since 1998
0 Likes
Tourist
10 0 2

thanks Karl,

I cant change in navigation.  I need to change banner space above header.  I think I need to change in liquid somewhere.

But thank you,

Donna

1 Like
Shopify Partner
1843 170 537

Ah, I see what you mean. You mean the top bar with the search, cart icon and announcements (if enabled).

 

Yes, for that you would need to edit some code. Let's get going then...

 

Step 1

As usual we will follow best practice and first back up the theme in case something does go wrong. Go to Online Store > Themes and then Actions > Duplicate. Good!

 

Step 2

Go to Actions > Edit code and from the editor that loads, open Sections / header.liquid from the left folder pane. In that file you should be able to find a bit of code that's like so

 

 

          {% if shop.customer_accounts_enabled %}
            <ul class="header-bar__module header-bar__module--list">
              {% if customer %}
                <li>
                  <a href="/account">{{ 'layout.customer.account' | t }}</a>
                </li>
                <li>
                  {{ 'layout.customer.log_out' | t | customer_logout_link }}
                </li>
              {% else %}
                <li>
                  {{ 'layout.customer.log_in' | t | customer_login_link }}
                </li>
                <li>{{ 'layout.customer.or' | t }}</li>
                <li>
                  {{ 'layout.customer.create_account' | t | customer_register_link }}
                </li>
              {% endif %}
            </ul>
          {% endif %}

 

 

Step 3

Comment it by adding this which has the benefit that you can always go back and uncomment it again.

 

 

{% comment %}
... the code from above would be here but I don't want to repeat it for brevity sake
{% endcomment %}

 

 

Step 4

Now open Sections / footer.liquid and find this bit of code

 

 

  <div class="grid">
    <div class="grid__item  text-center">
      <p class="site-footer__links">{{ 'layout.footer.copyright' | t }} &copy; {{ 'now' | date: "%Y" }}, {{ shop.name | link_to: '/' }}. {{ powered_by_link }}</p>
    </div>
  </div>

 

 

Step 5

Edit above bit of code to be like this

 

  <div class="grid">
    <div class="grid__item text-center">
      {% if shop.customer_accounts_enabled %}
        {% if customer %}
          <a href="/account">{{ 'layout.customer.account' | t }}</a>
          {{ 'layout.customer.or' | t }}
          {{ 'layout.customer.log_out' | t | customer_logout_link }}
        {% else %}
          {{ 'layout.customer.log_in' | t | customer_login_link }}
          {{ 'layout.customer.or' | t }}
          {{ 'layout.customer.create_account' | t | customer_register_link }}
        {% endif %}
      {% endif %}
    </div>
    <div class="grid__item text-center">
      <p class="site-footer__links">{{ 'layout.footer.copyright' | t }} &copy; {{ 'now' | date: "%Y" }}, {{ shop.name | link_to: '/' }}. {{ powered_by_link }}</p>
    </div>
  </div>

 

Hit Save and that's it.

 

Of course, you may wish to add it elsewhere - maybe a column above or along with the newsletter signup. That's just regular HTML within the footer.liquid file and for you to decide now.

 

Hope this helps!

 

I turn coffee in to code - since 1998
1 Like
Tourist
10 0 2

Thanks Karl.  Perfect!

0 Likes
Highlighted
Tourist
5 0 0

Thanks for the explanation It seems like I've done it right although it wasn't removed from the top so I need clarification on Section 3 where do I put the comment code?

 

Thanks Again

Jae

0 Likes
Tourist
5 0 0

Can't you just delete this portion and add the links to your Main or Footer menu:

 

{% if shop.customer_accounts_enabled %}

    {% if customer %}
  • {{ 'layout.customer.account' | t }}
  • {{ 'layout.customer.log_out' | t | customer_logout_link }}
  • {% else %}
  • {{ 'layout.customer.log_in' | t | customer_login_link }}
  • {{ 'layout.customer.or' | t }}
  • {{ 'layout.customer.create_account' | t | customer_register_link }}
  • {% endif %}

{% endif %}

 

 

------

 

 

Then add links to your menus  i.e. name.com/account/login and name.com/account/register 

0 Likes