Changing the color of a current word

Changing the color of a current word

ChoobShop
Tourist
20 0 1

Hey there, 

I hope you are doing well. I have a small issue with the design of my homepage. 

I wish to change the color only of one word. I will attach a screenshot of the exact way that I want it. 

Can I do it with a custom CSS?

I really appreciate any help you can provide.

Best,
Choob Shop 

Screenshot 2024-07-12 at 19.15.26.png


Screenshot 2024-07-12 at 19.16.37.png

Replies 6 (6)

WalkYourStyle
Excursionist
303 32 47

Can you please provide us a picture of the homepage's customization, specifically the image section with the text?

ChoobShop
Tourist
20 0 1

Hey! I think I need a clarification on what part you need because the text and image sections are in two different sections? 

ProtoMan44
Shopify Partner
528 44 81

@ChoobShop hey, thanks for posting here.
for it you need to put in span tag or any other to target .

or it will posible with custom js.
 can you please share the link to inspect it, thanks.

- A thirsty developer passionate about supporting the community. If you'd like to, you can  

Buy me a Coffee.


- Your Shopify Solution Specialist Get a Quote at

ProtoMan44

 - 

Chat On Whatsapp


Crafting exceptional e-commerce experiences to elevate your online presence. Let's build your success story together!
ChoobShop
Tourist
20 0 1

Yea, sure! 
https://www.choobshopbg.com/en
The pass is: 112233

 

WalkYourStyle
Excursionist
303 32 47

Instructions

1. Go to 'Online Store' -> Themes -> Customize

2. Go to the Image Banner Section and click on the heading block

3. Surround the wooden word with the span element like this: 

 

wooden.PNG

 

4. Go to your Active Theme and click on the 3 dots (...) -> Edit Code

5. Inside the Assets Folder locate the file 'base.css'

6. At the bottom of the file paste the below code

 

#Banner-template--21622885351751__image_banner .banner__heading span{
   color: green;
}

 

Moeed
Shopify Partner
4478 1160 1419

Hey @ChoobShop 

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code in the bottom of the file above </body> tag

<script>
const bannerHeading = document.querySelector('.banner__heading');
if (bannerHeading) {
    const text = bannerHeading.innerHTML;
    const replacedText = text.replace(/wooden/g, '<span style="color: #63cd35;">wooden</span>');
    bannerHeading.innerHTML = replacedText;
}
</script>

RESULT:

Moeed_0-1720803658292.png

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

-Need a Shopify Specialist? Chat on WhatsApp
- Custom Design | Advanced Coding | Store Modifications
- Your Coffee Tip and my code, A perfect blend. ❤️