Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Jimmi08/6faaeaa219fef43bd1d34f4b978fba22 to your computer and use it in GitHub Desktop.
Save Jimmi08/6faaeaa219fef43bd1d34f4b978fba22 to your computer and use it in GitHub Desktop.
Contact Form 7 GET slug/url hidden
//https://wordpress.stackexchange.com/questions/291855/how-to-get-current-url-in-contact-form-7
//You can use cf7 hidden field shortcodes + get parameters: https://contactform7.com/hidden-field/ https://contactform7.com/getting-default-values-from-the-context/
//In the mail form I use such shortcodes to get these slugs
[hidden utm_source default:get]
[hidden utm_medium default:get]
[hidden utm_campaign default:get]
[hidden utm_content default:get]
[hidden gclid default:get]
//It also works with their flamingo plugin. And for mail template [_url] works very well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment