Support » Fixing WordPress » Convert the_title to variable for contact form email subject

  • I used this tutorial to build a custom contact form in a single post template:

    http://www.catswhocode.com/blog/how-to-create-a-built-in-contact-form-for-your-wordpress-theme

    The form is working fine, but because the single post pages are car information posts for a car dealer, I need a way to send the post’s title in the email so that the site owner knows which car the email refers to.

    I tried this: $carmodel = the_title(”,”,false);

    But I’m not sure if I’m using it correctly or in the right place. I’m not getting any errors but I also don’t see $carmodel in the email I receive. Can someone help me convert the_title into a variable that I can send in email?

  • The topic ‘Convert the_title to variable for contact form email subject’ is closed to new replies.