New Donation Field Plus Customized Donor Name
/** * This is the full code for a tutorial written on the WP Charitable blog. * * For a step by step explanation of what each bit of code does and why, * read the post: * * @see…Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
/** * This is the full code for a tutorial written on the WP Charitable blog. * * For a step by step explanation of what each bit of code does and why, * read the post: * * @see…Continue reading
/** * By default, Charitable hides the admin bar from users * who do not have one of the `edit_posts`, * `manage_charitable_settings`, or `edit_products` * capabilities. * * The code below shows the admin bar for logged in users who…Continue reading
/** * By default, Charitable disables admin access for users * who do not have one of the `edit_posts`, * `manage_charitable_settings`, or `edit_products` * capabilities. * * The code below enables access for logged in users who do * not…Continue reading
/** * Add a link back to the campaign from the donation receipt. */ function ed_add_campaign_link_to_receipt( $donation ) { $campaigns = $donation->get_campaign_donations(); // We’re just linking to the first campaign. $campaign_donation = current( $campaigns ); ob_start(); ?>Continue reading
/** * You can set a custom donation receipt page, including a page * that is not on your own website. * * Note that if you just want to use a different page on your * site, you don’t…Continue reading
/** * Add a short summary after the donation details showing the funds raised by each campaign. */ function ed_add_campaign_stats_to_receipt( $donation ) { $campaigns = $donation->get_campaign_donations(); ob_start(); printf( ‘ %s ‘, __( ‘Campaign Stats’ ) ); foreach ( $campaigns as…Continue reading
/** * You may want to use a different donation receipt page for Offline * donations than your other donations. * * In the example below, just set $custom_page to the URL or permalink * of the page you would…Continue reading
/** * NOTE: This snippet will not work in versions of Charitable prior to 1.2. * * Set the default colour used by Charitable. * * @return string */ function en_set_default_highlight_colour() { return ‘#123456’; } add_filter( ‘charitable_default_highlight_colour’, ‘en_set_default_highlight_colour’ );Continue reading
/** * If you want all campaign thumbnails to have the same size, you can use the * snippet below. Note that images will be hard-cropped, so part of the image * may be cropped out. * * If you…Continue reading
/** * Remove the campaign descriptions from the campaign loop. */ function en_remove_campaign_description_in_loop() { remove_action( ‘charitable_campaign_content_loop_after’, ‘charitable_template_campaign_description’, 4 ); } add_action( ‘after_setup_theme’, ‘en_remove_campaign_description_in_loop’, 11 );Continue reading