Shortcode for short donation form?

[ad_1]

Hi @jdowns1

Sadly there is no shortcode version.

The template at charitable/templates/widgets/donate.php is pretty straight forward though if you want to add some PHP code that should deliver something similar.

$campaign_id  = 'current' == $view_args['campaign_id'] ? get_the_ID() : $view_args['campaign_id'];
$campaign     = charitable_get_campaign( $campaign_id );
$form = new Charitable_Donation_Amount_Form( $campaign );
$form->render();

You need to adjust how the campaign_id is discovered, but that effectively produces the same form the widget does. Plugins like WPCode and others can take snippets and turn them into shortcodes.

I hope this helps! BTW this a good recommendation I’ll pass along to our developers.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer