• pvancil

    (@pvancil)


    First, let me say that I am really new to this, so any help would greatly be appreciated.

    I am running WordPress 5.7.1 running New York Business theme.

    I have a test page that I am trying to embed Amazon links.

    The text-only link shows up fine in both the visual view and a page preview. When l click on the link it opens in a separate tab.

    An image-only link shows up in the visual view as a small box with some type of icon in it. In the preview view, it appears as the same type of small empty box. When l click on the link it opens in a separate tab.

    An image and text link shows up in the visual view it shows up as an empty rectangle box. It does not show up in the preview.

    I am pulling my hair out because all of the online posts and youtube videos make it seem so simple. I think I have read every forum trying to find an answer.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • I think this might require using a child theme and doing some custom coding. I’d suggest contacting the theme support community for your theme here: https://wordpress.org/support/theme/new-york-business/ and asking them if they have a way of adding custom fields. Generally I would say to look into using ACF https://wordpress.org/plugins/advanced-custom-fields/ but I am not sure it will actually allow you to embed the links the way you want.

    Also, if you are using Classic Editor you can add custom fields without a plugin using the custom fields meta box and then create a child theme to add the custom coding to force the fields to work correctly. Here is more info about child themes: https://developer.wordpress.org/themes/advanced-topics/child-themes/.

    Hope something in what I’ve said helps you. I will try to help further once I see your reply.

    @binarywc: I’m not sure if you mistakenly answered a different post here, as I don’t see what custom fields have to do with this. The Amazon affiliate link is a simple HTML anchor tag (text link) or an img tag inside an anchor tag (hyperlinked image). A custom HTML block in Gutenberg should be able to display either of these: you certainly don’t need custom fields or a child theme.

    @pvancil: Are you using an adblocker or some other privacy tool? It seems something on your computer or network is blocking the image from displaying.

    This was certainly the case for me: the Amazon subdomain that the image is served from (m.media-amazon.com) was blocked in my 3rd-party privacy DNS filter, so I got the same missing image icon you saw, as pictured below. But when I turned off my 3rd-party privacy DNS and used my local ISP’s DNS, the image loaded correctly, as shown below.

    Image blocked with my NextDNS privacy filter DNS:

    Image loaded with my local ISP’s DNS (no filtering):

    Nope no mistake. I’ve seen what you are trying to do be done with Custom fields tied to custom coding in a child theme. The code @pvancil is trying to embed might not be working correctly because it needs to be done how I described… I am not sure though because I am not extremely familiar with the amazon affiliate html coding he is using because the two sites where I have helped implement this both use custom fields and a child theme to embed it in the post so that the code can not be accidentally deleted when editing the post in the wp-admin post edit screen.

    Thread Starter pvancil

    (@pvancil)

    @gappiah: You nailed it. A while back I installed the DuckDuckGo search engine to get a more secure search engine. I didn’t realize that they also installed something they referred to a Privacy Essentials. This extension to my browser was blocking the Amazon links from my browser. I turned it off and everything is working great.

    Thanks much for the help. I am new at this and I was overthinking the issue. I was so focused on editors and themes that it never occurred to me it might be my browser.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Amazon Assoicate links’ is closed to new replies.