Forum Replies Created

Viewing 22 posts - 1 through 22 (of 22 total)
  • Author
    Posts
  • in reply to: Add the URL of the current page to the form #1475669

    You can close the ticket, thanks!

    in reply to: Add the URL of the current page to the form #1475658

    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);

    in reply to: Hide items in backend if user is not admin #1475570

    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!

    in reply to: Add the URL of the current page to the form #1475560

    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!

    in reply to: issue with update to Enfold 6 #1462494

    Hi!
    Thanks for your support.
    Now everything works correctly.
    Thank you.
    Best regards

    in reply to: issue with update to Enfold 6 #1461773
    This reply has been marked as private.
    in reply to: blog post by a single author #1419934

    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

    in reply to: GDPR compliance #1413303

    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,
    Stefania

    in reply to: Avia Layout Builder missing in the article #1371945

    Hi,
    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 regards

    in reply to: Avia Layout Builder missing in the article #1371928

    Thank you Yigit,
    now everything seems to be working again.
    Thanks a lot.

    in reply to: Avia Layout Builder missing in the article #1371925

    Hi, yes done.
    Thank you

    in reply to: Contact Form sender like email contact #1345489

    Thank you Ismael.
    Perferct, now it seems to work. Thank you for your support.

    Francesca

    Hi, 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 Regards

    in reply to: Enfold with LearnDash #1297565

    Hi Rikard,
    Thank you for your answer.
    I changed editor setting and now it seems to work. Problem solved! Thanks so much.

    Best Regards

    Francesca

    Hi Rikard,
    Thank you for your answer.
    I changed editor setting and now it seems to work. Problem solved! Thanks so much.

    Best Regards

    Francesca

    in reply to: Enfold with LearnDash #1296787
    This reply has been marked as private.
    in reply to: Problem with WP 5.6 #1272749

    Thank you very much!

    Best regards,
    Stefania

    in reply to: Problem with WP 5.6 #1272720

    Do 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
    Stefania

    in reply to: Problem with WP 5.6 #1272719

    Hello,
    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,
    Stefania

    in reply to: Problem with WP 5.6 #1272692

    Hi,
    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
    Stefania

    in reply to: Problem with WP 5.6 #1272516

    Hi, 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.

    in reply to: Problem with WP 5.6 #1272461

    Hello.
    There is everything in the private area.
    Thanks!

Viewing 22 posts - 1 through 22 (of 22 total)