Minimal theme remove create account

Highlighted
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
Highlighted
Shopify Partner
1839 176 690

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!

Liked this post? You might also like our fantastic upsell apps Candy Rack and Candy Cart or offer free gifts with Gift Box. All made with ❤️  and care by Digismoothie
0 Likes
Highlighted
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
Highlighted
Shopify Partner
1839 176 690

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!

 

Liked this post? You might also like our fantastic upsell apps Candy Rack and Candy Cart or offer free gifts with Gift Box. All made with ❤️  and care by Digismoothie
2 Likes
Highlighted
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
Highlighted
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
New Member
1 0 0

What if I have no header.liquid?? I've seen this in other forums to use this but I don't seem to have one? Please help. I think this is the way spambots are creating accounts.

0 Likes
Highlighted
New Member
10 0 0

Hi @KarlOffenberger , I used the first part of your code to remove the "Log In" and "Create Account" from the header. However, on mobile view when the menu is collapsed, when you click the 3 lines, "Log In" and "Create Account" still show up. Do you know why this would be?

 

 

0 Likes
Highlighted
Tourist
7 0 1

Hi there,

This got rid of log in / create account buttons on desktop view, but not mobile (which I am trying to do).

Do you know how to do this?

Thanks

Lestat

0 Likes