Title: a42's Replies | WordPress.org

---

# a42

  [  ](https://wordpress.org/support/users/a42/)

 *   [Profile](https://wordpress.org/support/users/a42/)
 *   [Topics Started](https://wordpress.org/support/users/a42/topics/)
 *   [Replies Created](https://wordpress.org/support/users/a42/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/a42/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/a42/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/a42/engagements/)
 *   [Favorites](https://wordpress.org/support/users/a42/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/users/a42/replies/page/2/?output_format=md) 
[→](https://wordpress.org/support/users/a42/replies/page/2/?output_format=md)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Ho to use media_sideload_image the right way ?](https://wordpress.org/support/topic/ho-to-use-media_sideload_image-the-right-way/)
 *  Thread Starter [a42](https://wordpress.org/support/users/a42/)
 * (@a42)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/ho-to-use-media_sideload_image-the-right-way/#post-6863878)
 * The best thing is to solve the problems your self 🙂 My ‘final’ code:
 *     ```
       $total_i = (string)$car->PictureCount ? (string)$car->PictureCount : '' ;
   
       if ($total_i) {
       	if ( !function_exists('media_handle_upload') ) {
       	require_once(ABSPATH . 'wp-admin/includes/media.php');
       	require_once(ABSPATH . 'wp-admin/includes/file.php');
       	require_once(ABSPATH . 'wp-admin/includes/image.php');
       	}
   
       for($i = 0; $i < $total_i; $i++ ) {
   
       $image = '';
   
       $url = (string)$car->Pictures->Url[$i] ? (string)$car->Pictures->Url[$i] : '' ;;
   
       $tmp = download_url( $url );
       	if( is_wp_error( $tmp ) ){
       		// download failed, handle error
       		log_me('download_url lykkedes ikke...'.$tmp);
       	}
           if($tmp) {
           }
   
       $file_array = array();
   
       preg_match('/[^\?]+\.(jpg|jpe|jpeg|gif|png)/i', $url, $matches);
       $file_array['name'] = basename($matches[0]);
       $file_array['tmp_name'] = $tmp;
   
       	// If error storing temporarily, unlink
       	if ( is_wp_error( $tmp ) ) {
       		@unlink($file_array['tmp_name']);
       	}
   
       $image = media_handle_sideload($file_array, $post_id, $title);
   
       // If error storing permanently, unlink
       	if ( is_wp_error($image) ) {
       		@unlink($file_array['tmp_name']);
       		return $image;
       	}
       $img_id = wp_get_attachment_url( $image );
   
       log_me($img_id);
   
       update_post_meta( $post_id, 'gallery_images' , $img_id );
       update_field( 'gallery_images', $img_id, $post_id);
   
       }
   
       $image1 = get_post_meta($post_id, 'gallery_images[1]');
   
       set_post_thumbnail( $post_id, $image1 );
   
           log_me('gallery_image indsat');
   
       }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Front End Users] Reset password not working](https://wordpress.org/support/topic/reset-password-not-working-6/)
 *  [a42](https://wordpress.org/support/users/a42/)
 * (@a42)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/reset-password-not-working-6/#post-6058913)
 * after some investigation I did discovered that the login process are pretty confussing:
   To get a password match you have to have User_Email_Confirmed row in the EWD_FEUP_Users
   table to return a Yes, otherwise $Passwords_Match = false;. On the option page
   you give the admin the possibility to say yes or no to this option and …
 * The variable $Use_Crypt always has to be “Yes” otherwise the $Passwords_Match
   = false; – this is also an opt out on the option page…
 * plus when you are logged in the login form is still displayed and when inserting
   the [logout] shortcode in the header.php the user are automatic always logged
   out ? Is there another way to show the logut and hide the login form when a user
   are logged in ?
 * /Adam
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Front End Users] Reset password not working](https://wordpress.org/support/topic/reset-password-not-working-6/)
 *  [a42](https://wordpress.org/support/users/a42/)
 * (@a42)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/reset-password-not-working-6/#post-6058909)
 * [@etoilewebdesign](https://wordpress.org/support/users/etoilewebdesign/) On top
   of this does the forgot password function not update the password in the database…
   and login does not seem to work – are you aware of this issue ?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Front End Users] Reset password not working](https://wordpress.org/support/topic/reset-password-not-working-6/)
 *  [a42](https://wordpress.org/support/users/a42/)
 * (@a42)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/reset-password-not-working-6/#post-6058903)
 * I solved this problem by replacing line 135 in front-end-only-users/Function/
   Process_Front_End_Forms.php:
 * $message .= __(“If you want to reset the password, please visit “, ‘EWD_FEUP’).
   site_url().”/”.$_POST[‘ewd-feup-reset-email-url’].”&add=”. $User_Email.”&rc=”.
   $resetcode.”\n”;
 * with:
 * $message .= __(“If you want to reset the password, please visit “, ‘EWD_FEUP’).
   site_url().”/”.$_POST[‘ewd-feup-reset-email-url’].”?add=”. $User_Email.”&rc=”.
   $resetcode.”\n”;
 * Hint! it should be ?add= in stead of &add.
 * Cheers,
    Adam
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Product Enquiry for WooCommerce (Now with AI Assistant)] How to overwrite the reciever's email address?](https://wordpress.org/support/topic/how-to-overwrite-the-recievers-email-address/)
 *  Thread Starter [a42](https://wordpress.org/support/users/a42/)
 * (@a42)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/how-to-overwrite-the-recievers-email-address/#post-6012946)
 * Hi there,
 * I did manage to change – dynamically – the wdm_admin_email variable but where
   can change the variable wdm_form_dataset[user_email] ?
 * Cheers,
    Adam
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Product Enquiry for WooCommerce (Now with AI Assistant)] How to overwrite the reciever's email address?](https://wordpress.org/support/topic/how-to-overwrite-the-recievers-email-address/)
 *  Thread Starter [a42](https://wordpress.org/support/users/a42/)
 * (@a42)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/how-to-overwrite-the-recievers-email-address/#post-6012891)
 * I have tried to update the admin_email by these steps:
 * function enquiry_to_vendor( $email ) {
    global $product;
 * $vendors = get_product_vendors( $product->id );
 *  if( $vendors ) {
    foreach( $vendors as $vendor ) { $email = $vendor->paypal_email;}
   return $email; }
 * }
 * function vendor_admin () {
    if( is_page(‘product’)) { add_filter( ‘pre_option_admin_email’,‘
   enquiry_to_vendor’ ); } }
 * add_action( ‘init’, ‘vendor_admin’ );
 * But it is still the site admin email which appears in the variable wdm_admin_email…
 * What to do ?
 * Cheers,
    Adam
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Product Enquiry for WooCommerce (Now with AI Assistant)] How to overwrite the reciever's email address?](https://wordpress.org/support/topic/how-to-overwrite-the-recievers-email-address/)
 *  Thread Starter [a42](https://wordpress.org/support/users/a42/)
 * (@a42)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/how-to-overwrite-the-recievers-email-address/#post-6012844)
 * so what I could do instead is to override the admin_email but how ?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Product Enquiry for WooCommerce (Now with AI Assistant)] Mail not received](https://wordpress.org/support/topic/mail-not-received/)
 *  [a42](https://wordpress.org/support/users/a42/)
 * (@a42)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/mail-not-received/#post-5719646)
 * If you still have the problem then I would suggest you to install the WP Mail
   Logging plugin – very useful 🙂
 * [https://wordpress.org/plugins/wp-mail-logging/](https://wordpress.org/plugins/wp-mail-logging/)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Q and A FAQ and Knowledge Base for WordPress] single page template](https://wordpress.org/support/topic/single-page-template-1/)
 *  Thread Starter [a42](https://wordpress.org/support/users/a42/)
 * (@a42)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/single-page-template-1/#post-5277471)
 * *closing topic*
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Q and A FAQ and Knowledge Base for WordPress] single page template](https://wordpress.org/support/topic/single-page-template-1/)
 *  Thread Starter [a42](https://wordpress.org/support/users/a42/)
 * (@a42)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/single-page-template-1/#post-5277470)
 * That’s indeed a great find 🙂
 * Cheers
 * Adam
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Q and A FAQ and Knowledge Base for WordPress] single page template](https://wordpress.org/support/topic/single-page-template-1/)
 *  Thread Starter [a42](https://wordpress.org/support/users/a42/)
 * (@a42)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/single-page-template-1/#post-5277462)
 * *bump* still no one who can help us out ?
 * [@nowton](https://wordpress.org/support/users/nowton/) the single post type template
   can be customized fairly simple… look there >> [http://codex.wordpress.org/Post_Type_Templates](http://codex.wordpress.org/Post_Type_Templates)
   for explaination of the post type templates.
 * Cheers,
    Adam
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [can't get tags of post …](https://wordpress.org/support/topic/cant-get-tags-of-post/)
 *  Thread Starter [a42](https://wordpress.org/support/users/a42/)
 * (@a42)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/cant-get-tags-of-post/#post-5053202)
 * Hi Steven
 * Yes I do call the $post (it’s inside a loop I try to get the tags)
 * If I use the function the_tags() I get nothing… (?)
 * Cheers,
    Adam
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Opening Hours] Opening hours in select box with date day](https://wordpress.org/support/topic/opening-hours-in-select-box-with-date-day/)
 *  Thread Starter [a42](https://wordpress.org/support/users/a42/)
 * (@a42)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/opening-hours-in-select-box-with-date-day/#post-4886580)
 * Hi Janizde
 * To determine the weekday of today I would use the date(); function:
 * `$weekday = date('L');`
 * and the date today:
 * `$date = date("d/m/Y");`
 * But how to get the array of opening hours into a loop outside the context of 
   the plugin puzzles me…
 * I want to make a loop ten times using range (0, 10) where the starting point 
   is the day of today…
 * Cheers,
    Adam
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] Send form to variable email ?](https://wordpress.org/support/topic/send-form-to-variable-email/)
 *  Thread Starter [a42](https://wordpress.org/support/users/a42/)
 * (@a42)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/send-form-to-variable-email/#post-4844455)
 * Yes, I have seen that tag…
 * But ff I use that tag would it not then be the author of the page (contact page)
   which would recive the mail and not the author of the page from which the request
   comes from ?
 * //Adam
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Q and A FAQ and Knowledge Base for WordPress] Template file and child themes](https://wordpress.org/support/topic/template-file-and-child-themes/)
 *  [a42](https://wordpress.org/support/users/a42/)
 * (@a42)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/template-file-and-child-themes/#post-4396439)
 * Hi Susan,
 * The plugin / shortcode is working now… 🙂
 * Can you recommend another faq plugin ?
 * Cheers,
    Adam

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/users/a42/replies/page/2/?output_format=md) 
[→](https://wordpress.org/support/users/a42/replies/page/2/?output_format=md)