We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Re: Remove prices on featured collection/homepage ONLY

Solved

Remove prices on featured collection/homepage ONLY

514rpm
Tourist
10 0 2

Hi,

 

I'm looking for a solution to remove the prices on the featured collection on the homepage ONLY. I've tried a lot of different options but it doesn't work or the lines of code to modify don't exist or it removes the prices everywhere.

If there is any option to remove all the prices on the homepage that would work as well.

 

I'm using the theme dawn 9.0.0

 

Does anyone knows how to do it?

 

Here is my website.

514rpm.com

 

Thank you!

Accepted Solution (1)
Van_Nguyen_GSG
Shopify Partner
161 23 44

This is an accepted solution.

Simply remove remove the first line of the css, as below then.

 

<style>
  body.index .price {
    display: none !important;
  }
</style>​​

 

 

Helping Shopify merchants build stores that convert.
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- If you still need help, feel free to reach out to me at: van@glue.sg
Cheers!

View solution in original post

Replies 14 (14)
514rpm
Tourist
10 0 2

Thank you for you reply,

I treid what you said but the line of code ''<span class="price">{{ product.price | money }}</span>''

doesn't exist. Here is what I have arround where it is suppose to be I believe.

 

{%- if show_mobile_slider or show_desktop_slider -%}
<div class="slider-buttons no-js-hidden">
<button
type="button"
class="slider-button slider-button--prev"
name="previous"
aria-label="{{ 'general.slider.previous_slide' | t }}"
aria-controls="Slider-{{ section.id }}"
>
{% render 'icon-caret' %}
</button>
<div class="slider-counter caption">
<span class="slider-counter--current">1</span>
<span aria-hidden="true"> / </span>
<span class="visually-hidden">{{ 'general.slider.of' | t }}</span>
<span class="slider-counter--total">{{ products_to_display }}</span>
</div>
<button
type="button"
class="slider-button slider-button--next"
name="next"
aria-label="{{ 'general.slider.next_slide' | t }}"
aria-controls="Slider-{{ section.id }}"

 

Do you have any other idea?

514rpm
Tourist
10 0 2

Sure! You can text me on instagram @514rpm.vinyls.

514rpm
Tourist
10 0 2

Do you know what to do?

Van_Nguyen_GSG
Shopify Partner
161 23 44

Hi @514rpm ,

 

  1. In layout/theme.liquid replace the <body class="gradient"> with <body class="gradient {{ template | handleize }}">
  2. Add the following code before this </head>

 

<style>
  body.index .price,
  body.collection .price {
    display: none;
  }
</style>​​

 

Helping Shopify merchants build stores that convert.
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- If you still need help, feel free to reach out to me at: van@glue.sg
Cheers!
514rpm
Tourist
10 0 2

Thanks for helping me,

It worked for the homepage but also in the collections but I need the prices to be seen into the collections. 

What I'm looking for is to have no prices on the homepage only. Do you know how to do it?

Van_Nguyen_GSG
Shopify Partner
161 23 44

This is an accepted solution.

Simply remove remove the first line of the css, as below then.

 

<style>
  body.index .price {
    display: none !important;
  }
</style>​​

 

 

Helping Shopify merchants build stores that convert.
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- If you still need help, feel free to reach out to me at: van@glue.sg
Cheers!
514rpm
Tourist
10 0 2

It worked, that's awesome! Thank you!

jlovelace1
Shopify Partner
6 1 2

Hi Kat, I'm dealing with the same issue and would like some clarity. When you say remove the first line of the css, what line are you referring to? Is it the first line of component-price.css?

Van_Nguyen_GSG
Shopify Partner
161 23 44

Hi@jlovelace1 

That was in reference to the first code solution I shared, this is the version you should use.

 

<style>
  body.index .price {
    display: none !important;
  }
</style>​​

 


This should go at the bottom of your "Layouts/theme.liquid" file, just above </body>

Helping Shopify merchants build stores that convert.
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- If you still need help, feel free to reach out to me at: van@glue.sg
Cheers!
jlovelace1
Shopify Partner
6 1 2

Okay. I tried this, nothing changed for me.

514rpm
Tourist
10 0 2

Hi,

 

Since the last update 11.0.0 it doesn`t work anymore. Do you know what I can to fix it?

 

Thank you so much!

johncAthra
Tourist
14 0 3

Hi Kat,

 

I also have the same issue.

Can you please look into it? My website is https://castillajewelry.com/

The passcode is 430Athra.

 

Thank you.

INA_MSWEB
Shopify Partner
1281 144 169

Hi @514rpm 


I hope you are doing good and welcome to the Shopify Community!
I am San from MS Web Designer.

1st you need to replace <body class="gradient"> to <body class="template-{{ request.page_type | handle }} gradient"> in your theme.liquid page.

2nd put this css in your bottom of the base.css file:
.template-index .price {display: none !important;}



Regards,

San

If it’s helpful to you, please mark it as a solution.  


Need Help with Shopify Design, Migration, Speed, or Custom tasks?  
email: hi@mswebdesigner.com
Try Our Conversion Booster app to get more sales | Connect Our Founder Linkedin

514rpm
Tourist
10 0 2

T tried but it did nothing unless I did something wrong, could you detail more the steps maybe?