Archived topic
Amazon Buy Now Button
11 replies · Started by kazama on February 18, 2021
Hello,
I want to know if it's possible to add/design an Amazon Buy Now button as is visible on the Amazon site.
If I remember correctly, I can use a .button CSS class. However, using that renders a plain black buy now button which is not what I want.
Alternately, I may simply fetch the button logo via PHP hardcoding or upload an image with landing page URL but that is again not what I want.
Could you please help me out with the correct CSS code?
Hi there,
Any chance you can link us to the site in question?
You can use the private information field.
Let me know :)
The site is still in development mode, I am afraid. Here's the image which I want to incorporate through a button Buy Now
Hi there,
We won't be able to diagnose what's causing the issue if we can't inspect the page.
Any change you can set up a live site we can check?
Hi there,
simplest method is to use a GenerateBlocks Button:
https://docs.generateblocks.com/article/buttons-overview/
You can style the button with the colors you require and add your SVG Icon to the button. You can get an SVG Icon download from the FontAwesome Library:
https://fontawesome.com/icons/amazon?style=brands
This article explains how to add the icon:
https://docs.generateblocks.com/article/adding-custom-svg-icons/
Thank you. But, there's a slight bit of problem: I am not using core WP block editor.
Is there any workaround for Classic Editor?
Couldn't you just make that image a link?
https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_link_image
That's what I mentioned in my first post. However, if I were to add that image a dozen times, page loading times could be 'severely' impacted.
Is there another feasible alternative?
If the Image URL is identical across all buttons then the browser will only request the Image once.
Ah, one learns something new every day.
BTW loving this lightweight theme so far. Major props.
Glad to be of help - and glad to hear your loving the theme :)