Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #893247

    Hi,

    I want to add the current post title in the subject of the form inserted in the post.
    I am trying with different options like:

    add_filter(‘avf_form_subject’,’avia_change_mail_subject’, 10, 3);
    function avia_change_mail_subject($subject, $new_post, $form_params) {
    $subject = __(‘Message from:’,’baztanet’ ) . single_post_title();

    return $subject;
    }

    I can’t gent the current post title. Hope you can help me. Thanks!

    #893279

    Hi,

    Nevermind, I found the solution: esc_html( get_the_title() );

    #893375

    Hi,

    I’m glad you got this corrected. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Page title in subject form’ is closed to new replies.