willnev
Forum Replies Created
-
Thank you for your quick response. I’m using the pro version of Astra so I’ll open a ticket with them to see if we can determine what’s causing the issue.
Thanks again!!
Forum: Plugins
In reply to: [WP Responsive Recent Post Slider/Carousel] Slider No Longer WorkingI’ve found the issue and corrected it.
Forum: Plugins
In reply to: [Gallery Custom Links] Change LinkLooks like the issue is with a lightbox plugin I have installed. Once I disabled it, I was able to change the link.
Do you know if there are any lighbox plugins that might work with this plugin. I have a page or 2 on a site where we just have images with no link set and we’d like them to open in a lightbox gallery.
Thanks for you help on this!
Perfect! that fixed the issue. I’m assuming the recent WordPress update must have caused the issue.
Thanks for all your help on this!
Forum: Plugins
In reply to: [Simple Shopping Cart] Add Text Field Per ProductYes! Perfect! Thank you for your quick response!
Perfect!!!!
Thank you so much Luis! I really appreciate your help! You’re awesome!!
Forum: Plugins
In reply to: [Theme My Login] Nav Link DisappearsSorry, I should have been a bit clearer. I’m using your plugin in conjunction with Pete’s Login Redirect. My client is looking to direct specific users to specific pages based upon their login. This is working properly using Pete’s Login Redirect. I was then trying to use your plugin to display the login box for users to login to. Sorry for the confusion.
Forum: Plugins
In reply to: [Theme My Login] Nav Link DisappearsI see your point. I have a client who is looking to have 2 pages password protected and would like users to be presented with a login box if they attempt to view the pages but would like to keep the nav item in place. Any suggestions on how I might be able to do that?
Update:
added this to the functions file and it worked:
add_filter( ‘wpcf7_load_js’, ‘__return_false’ );
I originally tried a copy/paste but noticed that the quote(s) used in the code were not being accepted. So I deleted each quote and retyped it in the editor and it worked.
I hope this helps.
I’m having the same issue.
Thanks so much for your quick response!
I updated the code with what you have there but the plugin My Custom Functions says there a “fatal error” (sound dire -lol).
Hey guys – I made a mistake as to which form I’m having an issue with. It’s actually, the form on the home page not the one 1 posted above. I added the code you suggested but still receive {referral} in the email confirmation rather than the name of the person that is being donated to.
The code now looks like this:
/**
* 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?>
<div id=”give-referral-wrap”>
<label class=”give-label” for=”give-referral”><?php _e( ‘Who would you liketo donate to?:’, ‘give’ ); ?></label>
<textarea class=”give-textarea” name=”give_referral” id=”give-
referral”></textarea>
</div>
<?php}
add_action( ‘give_purchase_form_after_personal_info’, ‘give_myprefix_custom_form_fields’, 10, 1 );
/**
* Validate Custom Field
*
* @description check for errors without custom fields
*
* @param $valid_data
* @param $data
*/
function give_myprefix_validate_custom_fields( $valid_data, $data ) {//Check that we’re validating the proper form
//Remove if this is a global field
if ( $data[‘give-form-id’] !== ‘754’ ) {
return;
}//Check for a referral data
if ( empty( $data[‘give_referral’] ) ) {
give_set_error( ‘give_referral’, __( ‘Who would you like to donate to.’, ‘give’ ));
}
}add_action( ‘give_checkout_error_checks’, ‘give_myprefix_validate_custom_fields’, 10, 2 );
/**
* 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;
}add_filter( ‘give_payment_meta’, ‘give_myprefix_store_custom_fields’ );
/**
* Show Data in Transaction Details
*
* @description show the custom field(s) on the transaction page
*
* @param $payment_meta
* @param $user_info
*/
function give_myprefix_purchase_details( $payment_meta, $user_info ) {//uncomment below to see payment_meta array
// echo “"; // var_dump($payment_meta); // echo "
“;
//Bounce out if no data for this transaction
if ( ! isset( $payment_meta[‘referral’] ) ) {
return;
}?>
<div class=”referral-data”>
<label><?php echo __( ‘Donation Goes To:’, ‘give’ ); ?></label>
<?php echo wpautop( $payment_meta[‘referral’] ); ?>
</div><?php
}add_action( ‘give_payment_personal_details_list’, ‘give_myprefix_purchase_details’, 10, 2 );/* Enter Your Custom Functions Here */
/**
* Get Donation Referral Data
*
* @description Example function that returns Custom field data if present in payment_meta; the example used here is in conjunction with the Give documentation tutorials
*
* @param array $tag_args
*
* @return string
*/
function my_custom_prefix_get_donation_referral_data( $tag_args ) {$payment_meta = give_get_payment_meta( $tag_args[‘payment_id’] );
$output = __( ‘No referral data found.’, ‘give’ );if ( isset( $payment_meta[‘referral’] ) && ! empty( $payment_meta[‘referral’] ) ) {
$output = $payment_meta[‘referral’];
}return $output;
}Hey guys –
Thanks for resposnding!
Here’s the code that I’m using. It’s being added by using the PHP Inserter plugin.
/**
* 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?>
<div id=”give-referral-wrap”>
<label class=”give-label” for=”give-referral”><?php _e( ‘Who would you liketo donate to?:’, ‘give’ ); ?></label>
<textarea class=”give-textarea” name=”give_referral” id=”give-
referral”></textarea>
</div>
<?php}
add_action( ‘give_purchase_form_after_personal_info’, ‘give_myprefix_custom_form_fields’, 10, 1 );
/**
* Validate Custom Field
*
* @description check for errors without custom fields
*
* @param $valid_data
* @param $data
*/
function give_myprefix_validate_custom_fields( $valid_data, $data ) {//Check that we’re validating the proper form
//Remove if this is a global field
if ( $data[‘give-form-id’] !== ‘754’ ) {
return;
}//Check for a referral data
if ( empty( $data[‘give_referral’] ) ) {
give_set_error( ‘give_referral’, __( ‘Who would you like to donate to.’, ‘give’ ));
}
}add_action( ‘give_checkout_error_checks’, ‘give_myprefix_validate_custom_fields’, 10, 2 );
/**
* 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;
}add_filter( ‘give_payment_meta’, ‘give_myprefix_store_custom_fields’ );
/**
* Show Data in Transaction Details
*
* @description show the custom field(s) on the transaction page
*
* @param $payment_meta
* @param $user_info
*/
function give_myprefix_purchase_details( $payment_meta, $user_info ) {//uncomment below to see payment_meta array
// echo “"; // var_dump($payment_meta); // echo "
“;
//Bounce out if no data for this transaction
if ( ! isset( $payment_meta[‘referral’] ) ) {
return;
}?>
<div class=”referral-data”>
<label><?php echo __( ‘Donation Goes To:’, ‘give’ ); ?></label>
<?php echo wpautop( $payment_meta[‘referral’] ); ?>
</div><?php
}add_action( ‘give_payment_personal_details_list’, ‘give_myprefix_purchase_details’, 10, 2 );/* Enter Your Custom Functions Here */
/**
* Adds a Custom “Referral” Tag
* @description: This function creates a custom Give email template tag
*
* @param $payment_id
*/
function my_custom_prefix_add_sample_referral_tag( $payment_id ) {
give_add_email_tag( ‘referral’, ‘This tag can be used to output the custom referral field’, ‘my_custom_prefix_get_donation_referral_data’ );
}add_action( ‘give_add_email_tags’, ‘my_custom_prefix_add_sample_referral_tag’ );
/**
* Get Donation Referral Data
*
* @description Example function that returns Custom field data if present in payment_meta; the example used here is in conjunction with the Give documentation tutorials
* @param $payment_id
*
* @return string|void
*/
function my_custom_prefix_get_donation_referral_data( $payment_id ) {$payment_meta = give_get_payment_meta( $payment_id );
$output = __( ‘No referral data found.’, ‘give’ );
if ( isset( $payment_meta[‘referral’] ) && ! empty( $payment_meta[‘referral’] ) ) {
$output = $payment_meta[‘referral’];
}return $output;
}Forum: Plugins
In reply to: [Conditional Fields for Contact Form 7] Conditional Field Not ChangingOK, great! Thank you for your help and this awesome plugin!