How to Append Referring URL to message Subject

By: David Bauer | Asked: 06/29/2024
ForumsCategory: How-toHow to Append Referring URL to message Subject
David Bauer asked 5 months ago
Hi Guys, I have a contact form on a website which offers Job Positions. There is same template for all these pages so when somebody sends a message through the form, it cannot be seen which position they are applying to. I managed to set it up so it shows Browser and Referring URL at the end of the actual message. But the client needs to see that particular URL (which is basically the job position's name) directly in the subject of the message. They need to search and sort and categories these emails by the message subjects.  Is there a way to include this info in the Subject field?   Thanks a lot for help!   David
3 Answers
Rob LeVineRob LeVine answered 5 months ago
You can quickly make a simple custom shortcode and the PHP program returns $_SERVER["HTTP_REFERER"]
David Bauer answered 5 months ago
:)   Thanks a lot but I'm not that good with coding...    I was hoping that I just missed some of the Advanced Fields here on the right, see the screenshot.
Attachments
Rob LeVineRob LeVine answered 5 months ago
Put this code either in a code snippet plugin or functions.php and use [ff_urlrefer] in your subject.
David Bauer replied 5 months ago

This works absolutely perfectly!

Thank you so much for help!

David

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right