Charitable Code Snippet library
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
campaign-loop Added a little more information to the campaign thubmanil size snippe… Aug 15, 2017
campaigns https://github.com/Charitable/library/blob/master/campaigns/add-post-… May 30, 2018
donation-form Swapped snippets Feb 7, 2018
donation-receipt Set a custom donation receipt page for offline donations Jun 21, 2017
donations Added function to create shortcode for donate button. May 18, 2018
emails https://github.com/Charitable/library/blob/master/emails/add-gateway-… Sep 20, 2018
endpoints https://github.com/Charitable/library/blob/master/endpoints/set-wp-lo… Sep 20, 2018
export https://github.com/Charitable/library/blob/master/export/add-campaign… Jul 2, 2018
extensions https://github.com/Charitable/library/blob/master/extensions/ambassad… Aug 29, 2018
forms/general Snippet showing how to make a variety of changes to form fields May 22, 2017
gateways https://github.com/Charitable/library/blob/master/gateways/paypal/use… Jun 4, 2018
general Load template files in the admin Apr 27, 2018
login-form https://github.com/Charitable/library/blob/master/login-form/redirect… Jul 11, 2017
notifications Added new snippet showing how to move campaign summary below main con… Nov 18, 2015
profile-form https://github.com/Charitable/library/blob/master/profile-form/keep-u… Aug 27, 2018
registration-form Added a snippet showing how to set the role that new users are given … Dec 5, 2016
styles Added example code to change highlight colour. Oct 24, 2015
themes https://github.com/Charitable/library/blob/master/themes/reach/add-so… May 16, 2018
.gitignore Updated the Readme to be much more useful Oct 24, 2015
.sublimelinterrc Adding a select field to a donation form May 22, 2017
README.md https://github.com/Charitable/library/blob/master/endpoints/set-wp-lo… Sep 20, 2018

README.md

Charitable Code Snippet library

This is a library of code snippets designed to help end users and theme or plugin developers.

How to use the code snippets

If you are new to PHP or WordPress development, we recommend adding these code snippets using the Code Snippets plugin. This allows you to add the code directly within your WordPress dashboard.

For those a little more familiar with WordPress development, you can use the snippets to create simple standalone plugins. Read the WordPress documentation about creating a plugin.

Alternatively, you could add the snippets directly to your theme or child theme's functions.php file.

Contributing a snippet

We welcome and encourage everyone to submit their code snippets. If you would like to submit your snippet, please fork the repository and then create a pull request.

Directory

General

Editing Forms

Donation form

Registering new fields (examples for charitable 1.5+)

Changing fields & other

Donation receipt

Donations

Emails

Campaigns

Campaign Page

Campaign Grid/Loop

Other

Notifications

Login form

Profile form

Registration form

Styles

Export

Payment Gateways

PayPal

Offline

Stripe

PayUMoney

PayFast

Extensions:

Charitable Ambassadors

Campaign Form
Campaigns
My Campaigns Shortcode
Emails

Charitable Easy Digital Downloads Connect

Charitable Recurring Donations

Charitable Newsletter Connect

MailChimp

Charitable Stripe Connect

Charitable User Avatar

Themes

Reach

3rd Party Themes

Legacy snippets

Pre Charitable 1-5