WPML – Set language of inserted post

The wpml_set_element_language_details action element_type need to be with the correct prefix that WPML use: From the WPML Docs element_type(string) The type of an element. Can be a post type: post_post, post_page, post_attachment, post_nav_menu_item, post_{custom post key} or taxonomy: tax_category, tax_post_tag, tax_nav_menu, tax_{custom taxonomy key}. Defaults to post_post if not set. In your case it should … Read more

Download any file after submitting a form [closed]

You can use “actions”. More info: http://hookr.io/actions/wpcf7_mail_sent/ Put this code in your functions.php: function action_wpcf7_mail_sent( $contact_form ) { // here your file redirect header(“Location: http://yourfileurl.com”); }; add_action( ‘wpcf7_mail_sent’, ‘action_wpcf7_mail_sent’, 10, 1 ); let me you if it is working i cannot test right now.

Copying uploaded images not working in wordpress

Since i was also looking for some sort of keeping submitted images, i found this simple plugin, which gave me a bit insight: https://wordpress.org/plugins/store-file-uploads-for-contact-form-7/ Also if you read a bit on the mentioned “file-uploading-and-attachment” topic in cf7, you should get the point: For security reasons, specifying files outside of the wp-content directory for email attachments … Read more

CF7 conditional logic [closed]

The only way to achieve this is to use a custom script file. Load the script on the page where your form is being loaded using the following back-end function in your functions.php file, add_action( ‘wp_enqueue_scripts’,’register_custom_script’); //its important to register the script, else it will not load properly. function register_custom_script(){ wp_register_script( ‘custom-cf7-script’, <url to your … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)