Forum Replies Created
-
AuthorPosts
-
You can close the ticket, thanks!
Thank you so much everyone!
I solved it thanks to your instructions.
Below is the code used, if it helps, which inserts URL and page title to all forms.Thank you for your help and your time!
————
function add_page_info_to_form_email($message, $new_post, $form_params) {
// Debug: Controlliamo se la funzione viene eseguita
error_log(‘DEBUG: Entrato in add_page_info_to_form_email’);// Recupera il titolo e l’URL della pagina corrente
$page_url = get_permalink();
$page_title = get_the_title();// Se il titolo è vuoto, proviamo a recuperarlo dall’URL di riferimento
if (empty($page_title) && isset($_SERVER[‘HTTP_REFERER’])) {
$referrer_url = esc_url_raw($_SERVER[‘HTTP_REFERER’]);
error_log(‘DEBUG: Il titolo della pagina è vuoto, provo a recuperarlo dall’URL -> ‘ . $referrer_url);$response = wp_remote_get($referrer_url);
if (!is_wp_error($response)) {
$body = wp_remote_retrieve_body($response);
preg_match(‘/<title>(.*?)<\/title>/s’, $body, $matches);
if (!empty($matches[1])) {
$page_title = html_entity_decode(trim($matches[1]), ENT_QUOTES | ENT_HTML5, ‘UTF-8’);
$page_title = preg_replace(‘/[^\x20-\x7E]/’, ”, stripslashes($page_title));
error_log(‘DEBUG: Titolo recuperato dal corpo della pagina -> ‘ . $page_title);
}
}
}// Se il titolo è ancora vuoto, assegna un valore predefinito per il debug
if (empty($page_title)) {
$page_title = ‘Titolo non disponibile’;
error_log(‘DEBUG: Nessun titolo trovato, imposto “Titolo non disponibile”‘);
}// Se l’URL è vuoto, recuperiamolo dall’HTTP_REFERER
if (empty($page_url) && isset($_SERVER[‘HTTP_REFERER’])) {
$page_url = esc_url_raw($_SERVER[‘HTTP_REFERER’]);
error_log(‘DEBUG: URL recuperato da HTTP_REFERER -> ‘ . $page_url);
}// Debug finale prima di aggiungere le informazioni alla mail
error_log(‘DEBUG: Titolo finale prima di inviare la mail -> ‘ . $page_title);
error_log(‘DEBUG: URL della pagina -> ‘ . $page_url);// Aggiungiamo il titolo e l’URL al fondo del messaggio email
$message .= “\n\n—\nTitolo della pagina: ” . $page_title . “\nURL: ” . $page_url . “\n”;return $message;
}
add_filter(‘avf_form_message’, ‘add_page_info_to_form_email’, 10, 3);Thanks, it’s perfect for blocking a single element!
If instead I wanted to create a layout in an article and allow an editor to change only the content, how can I do it?
I used the custom template (Lock Advanced Layout Builder ON), but the editor can’t change anything.Thanks for your help!
Thank you Mike,
but I have the same form in all the articles, added with a shortcode, which recalls a page with a color section and a form inside.
I tried putting some code in the object, but it doesn’t work. Where can I find the files relating to the form, so I can study them. Or does anyone know how to do it?
Thank you so much!Hi!
Thanks for your support.
Now everything works correctly.
Thank you.
Best regardsThis reply has been marked as private.Hi Ismael, thank for your support.
I have another problem: among the custom elements (ALB) there is no cod block and full-width menu. Can you help me understand how I can do it?
Thank you
Hello,
thank you very much for your response.
Do you have a custom solution available to offer?We have many websites developed with Enfold.
Thank you.
Best regards,
StefaniaHi,
thanks for your check.
It seems that the problem is related to my administrator account, because if I log in with your temporary account the problem does not exist. I can’t understand why. Do you have a idea?
Best regardsThank you Yigit,
now everything seems to be working again.
Thanks a lot.Hi, yes done.
Thank youThank you Ismael.
Perferct, now it seems to work. Thank you for your support.Francesca
March 21, 2022 at 8:51 pm in reply to: Contact Form has as sender my email address, not client address! #1345411Hi, I’m using the contact form of the theme.
I would like the starting address for the form to be the same as the email of the person filling out the form.
If I leave the field blank, the starting address is noreply@… I would like it to be the email address of the sender. It’s possible?
Thank you for your support.
Best RegardsHi Rikard,
Thank you for your answer.
I changed editor setting and now it seems to work. Problem solved! Thanks so much.Best Regards
Francesca
April 30, 2021 at 2:31 pm in reply to: Avia page builder does not work in WooCommerce Product Page #1297564Hi Rikard,
Thank you for your answer.
I changed editor setting and now it seems to work. Problem solved! Thanks so much.Best Regards
Francesca
This reply has been marked as private.Thank you very much!
Best regards,
StefaniaDo you think it is better to wait for the new release before updating the others?
Will it take a long time?
Thanks for your advice
StefaniaHello,
thanks! Perfect.
Then I will do the same in the other templates I have installed and immediately buy another one for a new project!Thanks for the assistance.
Best regards,
StefaniaHi,
I tried with your directions, but it doesn’t work.
You find the credentials in private, I took a test and I log in.Thanks for your help
StefaniaHi, do you have any news? Because tomorrow I should buy another template for a client and I wanted to use Enfold, but if it doesn’t work with WP 5.6 I can’t. Thanks for the help.
Hello.
There is everything in the private area.
Thanks! -
AuthorPosts