• Hi All

    I want to put a contact for at the foot of each post and have the generated email tell me which post it came from.

    You will ahve to excuse me but when it comes to anything other than CSS I’m a total noob!

    I’m guessing it would be done by php along the lines of ‘get post title’ or something like that?

    Any help is greatly appreciated.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’ve not tried this but something like:

    <p><a href="mailto:your_email_address?subject=<?php the_title('', '', false ); ?> ">Link Text</a></p>

    should work as long as it’s inside the Loop.

    If you place the form inside post content, you can use this easier way. You can simply insert [wpcf7.post_title] into the message body field and it will be replaced by the post title.

    Special Mail Tags

    Thank you, very much appreciated – I’ll give these a tray and let you know how I get on

    (Forget to log into my own account so posted under a clients account, daisyblog)

    bhomatude

    (@bhomatude)

    Takayukister — This is not working for me. I’ve tried many different variations (that I’ve seen in other forums) like [_post_title] but I just get the shortcode back. Any ideas?

    bhomatude

    (@bhomatude)

    Update: problem is in the contact form 8. I uninstalled and went back to 7. Special mail tags work perfect in 7.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Contact Form 7 – auto insert post title’ is closed to new replies.