move Button label to below heading - featured collection

move Button label to below heading - featured collection

ads18922
Trailblazer
197 0 62

hello, i would like to move my button label for my featured collection so that it is below my heading, as it is currently at the bottom of the collection:

Screenshot 2025-01-29 at 13.10.20.png

this is my store, i would like it to look something like this:

IMG_6679.jpg

website is www.antico-abito.com , password is chasha , theme is dawn

Reply 1 (1)

htmlBurger
Shopify Partner
87 8 21
Hello,

 

You are currently using 2 different sections:
- Rich text section for the title
- Featured collection for the products and the button

 

You have 2 options here.

 

Option 1 (the easier solution)
Add a button in the Rich text section and link it to the specified collection.

 

Option 2
Remove the Rich text section and add the title through the Featured collection (it has an option for a title). Then, you need to make some code modifications to change the position. Go to Online store -> Themes -> Edit code and find the file `sections/featured-collection.liquid`.
On line 183, you'll see this code:
 

 

{%- if section.settings.show_view_all and more_in_collection -%}
  <div class="center collection__view-all{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}">
    <a
      href="{{ section.settings.collection.url }}"
      class="{% if section.settings.view_all_style == 'link' %}link underlined-link{% elsif section.settings.view_all_style == 'solid' %}button{% else %}button button--secondary{% endif %}"
      aria-label="{{ 'sections.featured_collection.view_all_label' | t: collection_name: section.settings.collection.title | escape }}"
    >
      {{ 'sections.featured_collection.view_all' | t }}
    </a>
  </div>
{%- endif -%}

 

 
Cut it and paste it on line 88, after this piece of code:
 

 

<div
  class="collection__title title-wrapper title-wrapper--no-top-margin page-width{% if show_mobile_slider %} title-wrapper--self-padded-tablet-down{% endif %}{% if show_desktop_slider %} collection__title--desktop-slider{% endif %}">
  {%- if section.settings.title != blank -%}
  <h2
    class="title inline-richtext {{ section.settings.heading_size }}{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}">
    {{ section.settings.title }}
  </h2>
  {%- endif -%}
  {%- if section.settings.description != blank
  or section.settings.show_description
  and section.settings.collection.description != empty
  -%}
  <div
    class="collection__description {{ section.settings.description_style }} rte{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}">
    {%- if section.settings.show_description -%}
    {{ section.settings.collection.description }}
    {%- else -%}
    {{ section.settings.description -}}
    {%- endif %}
  </div>
  {%- endif -%}
</div>

 

 

This will change the position of the button.  I hope this is helpful.

Found this helpful? Like and accept as solution to help others too!
htmlBurger – Founded in 2007, Shopify experts for 10+ years.
Custom themes, UI/UX design, ongoing maintenance & support.
Let's talk: ecom@htmlburger.com