Convert the_title to variable for contact form email subject (1 post)

  1. redkitecreative
    Posted 5 years ago #

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


    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?

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 5 years ago by redkitecreative
  • This topic is not resolved
  • WordPress version: 3.0.1