Support » Plugin: Seamless Donations » Trying to add a block for a like button

  • Resolved jpaytoncfd


    Your plugin works great, I am trying to add a block to the top that has a facebook like button.

    This is the section and you can see the two lines I added. There is no effect to the output from this. Everything still works but this code is not added to the output.

    function dgx_donate_get_donation_section($formContent)
      $output = "";
    	$output .= "<div class=\"dgx-donate-form-section\"> <iframe src=\"//\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; height:62px;\" allowTransparency=\"true\"></iframe></div>";
      $output = "";
    	$output .= "<div class=\"dgx-donate-form-section\">\n";
    	$output .= "<h2>" . esc_html__( 'Donation Information', 'dgx-donate' ) . "</h2>\n";
    	$output .= "<p>" . esc_html__( 'I would like to make a donation in the amount of:', 'dgx-donate' ) . "</p>";

    I was trying to do a facebook like lock but none of them worked with this plugin so this is the alternative. If you can point me in the direction of what I am missing it would be so helpful.

    This is the page

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi! I don’t recommend changing the plugin (you’ll lose your changes on the next release of seamless donations, but what dgx_donate_get_donation_section does is concatenate to the $output variable each piece of the form

    In PHP, that’s using .=

    if you use $output .= to add things, it should work.

    Alternatively, may I suggest just adding the facebook like button code to the page above the dgx-donate shortcode?

    Thanks for the response. I figured it out. I had to remove the second $output = "";

    Once I did that it worked great. We only use the plugin for promotions so would likely not update it or change it unless there was a new feature.

    Its a great plugin and should be very helpful once we work the legal bugs out..


    Awesome! Glad to hear it.



Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Trying to add a block for a like button’ is closed to new replies.