Skip to content

Instantly share code, notes, and snippets.

@wpgaurav
Created May 10, 2022 11:54
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save wpgaurav/88b36fb8bdfeb6a87fa86924e25cd58d to your computer and use it in GitHub Desktop.
/**
* Create shortcode for donate box.
*
* @since 1.0
*/
function md_child_donate_shortcode( $atts ) {
ob_start();
?>
<form action="https://www.paypal.com/donate" method="post" target="_top" class="text-center mb-half">
<input name="hosted_button_id" type="hidden" value="23NQ9H5U7CMPJ" />
<input title="PayPal - The safer, easier way to pay online!" alt="Donate with PayPal button" name="submit" src="https://www.lilienbrown.net/wp-content/uploads/2022/04/jan_ed_fund_logo2.png" type="image" />
<p><button class="button button-arrow">Donate now</button></p>
</form>
<?php return ob_get_clean(); }
add_shortcode( 'donate_now', 'md_child_donate_shortcode' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment