Shopify themes, liquid, logos, and UX
Hi!
I would like to change specific text on my shopify webpage, however, I see that this cannot be done without CSS.
Could you guys help me in this?
Here is an example that I would like to change:
I would like to change this to this color: #008ECC
Sincerely,
Treasora
Hi @Treasora It can be done with editing the HTML element as well, It seems like this is some page in your store, so you have added the text on that page and there is a option in that page as well to see the HTML code of that page. You need to click on that HTML code, and add this code, on the text where you want to change the color.
style="color: #008ECC;"
If you will unable to implement the same then I'm happy to do this for you, let me know. I can implement the code changes so that this will work well for you.
Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!
Best Regards
Sahil
- Your
Hi Sahil,
Thanks for your help, trying to figure it out now.
For example, I want to change this specific text:
Having a bit of trouble of where to insert the code that you provided, it keeps saying error invalid json.
Do you know where exactly to put the code?
Thanks in advance Sahil!
Kind Regards,
Treasora
Hi @Treasora Yes it will show the error, because it is not the correct place where you need to add the code, Just give the screenshot where you have added that text in your store, I will specify you where you can add the code.
Here is the example:
If this is a page then you need to go in that page and click on this sign "</>" and you will find the code.
<strong style="color: #008ECC;" > your text </strong>
So your code will look like this.
Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!
Best Regards
Sahil
- Your
Hi Sahil,
Here is a screenshot of where I have added the text in the page:
In this section there is no HTML button as far as I can tell.
Any ideas?
Thanks in advance!
I did this and it seemed to work in the preview:
However, when saving, it turns back to this:
Hi @Treasora It will not work here as HTML code didn't use to work here, because it's defined in shopify as a normal rich text.
The better way to accomplish this is through JS code, if the text is coming from here.
Best Regards
Sahil
- Your
Thanks Sahil, any idea how to do this? have no clue
Hi @Treasora I can provide you the base code because for providing you the exact code I need the access of your store, but you edit the base code according to your theme file code and needs and it will work.
Here's an example of how you can change the text color of specific words with Javascript:
// Replace 'target-word' with the class or identifier of the HTML element containing the target words
var targetElements = document.querySelectorAll('.target-word');
targetElements.forEach(function(element) {
// Replace 'specific-word' with the specific word you want to change the color for
var newText = element.innerHTML.replace(/specific-word/g, '<span class="highlighted-word">specific-word</span>');
element.innerHTML = newText;
});
.highlighted-word {
color: red; /* Change to the desired text color */
}
Note: Copy and pasting of this code will not do anything and it will not work, this is the base code and you need to edit it according to your theme file codes.
Also you need to add the code in your theme.liquid file.
If you will unable to implement the same then I'm happy to do this for you, let me know. I can implement the code changes so that this will work well for you.
Hopefully it will help you. If yes then Please don't forget hit Like and Mark it as solution!
Best Regards
Sahil
- Your
Hi Treasora,
I was in the same situation a couple of weeks ago, so I decided to build my own app to solve this. It made my life a lot easier, and I’m sure it will help you too. Plus, it’s free! 🙂
You can check it out here: https://apps.shopify.com/pulsar
Best,
Levi
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025