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!
Hi,
Nevermind, I found the solution: esc_html( get_the_title() );
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