HTML Header

  • Unknown's avatar

    I am trying to add a donate button through PayPal to my website through a widget. When I paste the code into the content section, I receive 4 error messages. How do I fix this?

    The blog I need help with is: (visible only to logged in users)

  • Hi there,

    Could you grab a screenshot of those errors and upload to your Media Library for me to see? Here’s how to take a screenshot:

    Take a Screenshot

    Also, make sure to follow these instructions on how to generate and embed that button:

    https://en.support.wordpress.com/paypal/

    Alternatively, since you’re on the Premium plan, you can use the Simple Payments feature that lets you add a payment button to any post, page, or widget area, and receive PayPal payments for physical products, digital goods, or donations. You can find more information here:

    https://en.support.wordpress.com/wordpress-editor/blocks/simple-payments-block/

    and here’s how to set it up in the widget area:

    https://en.support.wordpress.com/wordpress-editor/blocks/simple-payments-block/3/

  • Unknown's avatar

    I was not able to screenshot my computer for some reason. I tried using the line HTML code by following the instructions that you linked in the previous response. I keep getting an error on line 2 that says “special characters must be escaped”. Here is what I currently have down:


    Donate Button

    Please let me know what I have typed in wrong on the img line (line 2).
    Thanks,
    Grant

  • Hi Grant –

    The Donate Button link that you shared shows me a working donation page. I’m not sure I understand the trouble.

    Let’s try to start from the beginning. You are trying to add the donation button in to the site sidebar?

    Click here: https://cstonefarms.wordpress.com/wp-admin/customize.php

    Select Widgets > Main Side Bar

    You will find that I have added an HTML widget titled “Donations”. Open that Widget up to edit and update the title to what you want to use.

    Now, looking at the PayPal instructions: https://en.support.wordpress.com/paypal/

    You’ll need to follow those exactly. Do the steps you took before match up with the screen shots in that tutorial? You need a sharable URL. Once you get that paste it here for me and I can finish the widget setup.

  • Unknown's avatar

    I did not see the “Donations” widget that was mentioned in the last email. I do not care which of the buttons is displayed, just as long as it is one that only has “donate” on it. Here is the shareable URL. I apologize for my lack of knowledge in this realm, I know I am not easy to try to figure this out with.

    https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TU7PBA9VSYXJL&source=url

    Thanks,
    Grant

  • Unknown's avatar

    As I create the widget, everything seems to be fine with me as well. The button shows up on the preview, but these 2 errors on the second line prevent me from publishing the widget to the website

  • Grant, I think I see the problem. The donate image we’re linking to no longer exists on PayPal’s site.

    I’m not positive yet what the new one would be, but can you try this code to see if it works for you? This is just a basic blue button. Or you can find an image you like and we can help you use that.

    <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TU7PBA9VSYXJL&source=url" style="display: inline-block; padding: .5em; margin: .5em; border-radius: .5em; background-color: #7399b9; color: white;" target="_blank">
     Donate
    </a>
  • Actually, correction again. I found the issue is in the code we shared. We’ll work on fixing that.

    Here’s the correct code:

     <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TU7PBA9VSYXJL&source=url">
     <img src="https://www.paypalobjects.com/webstatic/en_US/btn/btn_donate_92x26.png" alt="Donate Button" />
    </a>


    Donate Button

  • The topic ‘HTML Header’ is closed to new replies.