How to change button colours in embedded collection?

Topic summary

A user is attempting to customize the button color (to #1F2021 with white text) in a Shopify Buy Button collection embedded on a WordPress site, but the default green color persists.

Technical Challenge:

  • The embedded collection uses Shopify’s Buy Button SDK script
  • Standard CSS modifications aren’t working as expected
  • The code provided appears partially corrupted/reversed in the original post

Community Response:

  • Multiple users requested the website URL to investigate
  • URL shared: casualsex.store/pages/test-embed
  • One responder indicated the issue stems from iframe implementation, suggesting direct code modification may not be possible
  • Another user requested clarification on the exact targeting method and working examples, noting that adding styles to scripts differs from standard CSS

Current Status:

  • Unresolved; confusion exists about whether customization is possible within the iframe constraints
  • Unclear if changes must be made within Shopify settings or if external CSS/script modifications can work
  • Request for more specific, actionable guidance with examples
Summarized with AI on November 14. AI used: claude-sonnet-4-5-20250929.

Hi there,

how can one change the colour [currently shopify’s green] of a collection embedded on another website [wordpress]? I’d like to change the button colour to #1F2021 and the button text to white.

the below code is not giving me a way in.
Would hugely appreciate the help!
Thank you. :slightly_smiling_face:


1 Like

@robin_4

Sorry you are facing this issue, it would be my pleasure to help you.

Welcome to the Shopify community! :blush:
Thanks for your good question.

Please share your site URL,
I will check out the issue and provide you a solution here.

hello @robin_4

Please provide the website URL and if your store is password protected then also provide a password So I will check and provide a solution here and please share screenshot which button change color

Thank you!

It is here: https://casualsex.store/pages/test-embed

thank you! it is https://casualsex.store/pages/test-embed

1 Like

@robin_4

sorry for this issue its coming from ifram so doesn’t possible to work any code you can do on buy now button on code

1 Like

so are you saying it is impossible to change colour, or? or must I change code within my shopify?

@robin_4

your have check color on your boy now button script

2 Likes

Can you expand on this? There is no default colour set inside the default script styles for button color. Do I add this, and am I targeting the “shopify-buy__btn”?

The schema for adding style scripts is different than just adding CSS.

How exactly do I target the buttons and change the color? Please give working examples otherwise your answer is not helpful.