Tagged: x
-
AuthorPosts
-
February 6, 2017 at 12:02 am #1359190
ChristopherModeratorHi there,
You shouldn’t edit x theme’s functions.php, please remove following code from this file :
/** * Custom Form Fields * * @param $form_id */ function give_myprefix_custom_form_fields( $form_id ) { //Only display for a specific form; //Remove "If" statement to display on all forms if ( $form_id == '452' ) { ?> <div id="give-referral-wrap"> <label class="give-label" for="give-referral"><?php _e( 'What or Who are you giving towards? (For example: Tithe or John Doe)', 'give' ); ?></label> }endif; } add_action( 'give_after_donation_levels', 'give_myprefix_custom_form_fields', 10, 1 ); /** * Add Field to Payment Meta * * @description store the custom field data in the payment meta * * @param $payment_meta * * @return mixed */ function give_myprefix_store_custom_fields( $payment_meta ) { $payment_meta['referral'] = isset( $_POST['give_referral'] ) ? implode( "n", array_map( 'sanitize_text_field', explode( "n", $_POST['give_referral'] ) ) ) : ''; return $payment_meta; }All custom functions should be added in child theme’s functions.php file.
Thanks.
February 6, 2017 at 9:23 am #1359736
teddyholcombParticipantThis reply has been marked as private.February 6, 2017 at 9:33 am #1359756
teddyholcombParticipantTHANK YOU!!!! The site is back up & running!!!! Could you help explain to me a little better where I need to add any code like that so it won’t shut the site down? I’m only trying to add one custom field to my “Give” plugin form. I used code from their site that they referred to as a “Hook”. It’s my first time trying to add something like that within WP and a plugin.
Thank you!
February 6, 2017 at 9:46 am #1359780
JoaoModeratorHi There,
You need to install a Child Theme, you can download your child theme from here:
https://community.theme.co/dashboard/
For more info refer to:
https://community.theme.co/kb/how-to-setup-child-themes/
Than you have to add the code above to the function.php of your Child Theme.
Let us know if you have further questions,
Joao
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1339774 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
