Change .button div "view all" position

Solved

Change .button div "view all" position

Domisana
Excursionist
30 0 8

Hi I was wondering can someone help me change this view all button position, I want it to be below collection header not bellow collection images.

this is what i want Screenshot_8.png

this is how my website look likeScreenshot_7.png

 

I want to change that for both of my collections on homepage, my website is domisana.com

 

Thanks!

Accepted Solution (1)

Guleria
Shopify Partner
4147 809 1164

This is an accepted solution.

Hello @Domisana ,

 

Edit theme.liquid search for </body>

Now just before to it add this code

<script>
document.addEventListener("DOMContentLoaded", function () {
  // Select all '.collection' containers
  const collections = document.querySelectorAll('.collection');

  collections.forEach(collection => {
    const viewAll = collection.querySelector('.collection__view-all');
    const sliderComponent = collection.querySelector('slider-component');

    // Rearrange: move 'viewAll' before 'sliderComponent' in each collection
    if (viewAll && sliderComponent) {
      collection.insertBefore(viewAll, sliderComponent);
    }
  });
});
</script>

 

Regards
Guleria

- Custom themes, UI/UX design, ongoing maintenance & support.
- Drop an email   if you are looking for quick fix or any customization
- Email: guleriathakur43@gmail.com Skype: live:navrocks1
- Try GEMPAGES a great page builder

View solution in original post

Replies 4 (4)

Guleria
Shopify Partner
4147 809 1164

This is an accepted solution.

Hello @Domisana ,

 

Edit theme.liquid search for </body>

Now just before to it add this code

<script>
document.addEventListener("DOMContentLoaded", function () {
  // Select all '.collection' containers
  const collections = document.querySelectorAll('.collection');

  collections.forEach(collection => {
    const viewAll = collection.querySelector('.collection__view-all');
    const sliderComponent = collection.querySelector('slider-component');

    // Rearrange: move 'viewAll' before 'sliderComponent' in each collection
    if (viewAll && sliderComponent) {
      collection.insertBefore(viewAll, sliderComponent);
    }
  });
});
</script>

 

Regards
Guleria

- Custom themes, UI/UX design, ongoing maintenance & support.
- Drop an email   if you are looking for quick fix or any customization
- Email: guleriathakur43@gmail.com Skype: live:navrocks1
- Try GEMPAGES a great page builder
Domisana
Excursionist
30 0 8

Thank you very much, it works!

Code-Crafting
Shopify Partner
10 1 4

Hi Domisana,
Though Guleria's approach is very good and dynamic for every collection, if you want it for a single collection you can follow the recording below. Hope it will help you. 

 

Regards,
Development Team
Code Crafting AI
Stock Meter: Real‑Time Stock

devcoders
Shopify Partner
1418 170 445

Hello @Domisana 

Thank you for submitting your query to the Shopify community. I’d be happy to assist you. Could you please provide the store URL and password (if it’s password-protected) so I can review and get back to you with an update?

Shopify Developer: Helping eCommerce Stores
If you need assistance with your store, feel free to contact us at devcodersp@gmail.com
WhatsApp No: +91 8516919310 If my assistance was helpful, please consider liking and accepting the solution. Thank you!