So, I’ve always put the contact form 7 shortcode into the content section of a wordpress page and it displays fine. However, I want to put it a header now, but I can’t get it to work. When i put it in the header then it just displays as plain text. What is the trick to getting it to work in a header?
I currently am working locally so I don’t have a link to share.
Well, I just found the answer. If you want to use the contact form 7 in any other place than the contact form editor then you cannot use the short code. What you have to do is put the short code on your site using the text editor then use view page source to see the code that it puts out and copy and past that code into your php file (header, footer, or wherever you want it).
Hehe, I was wondering about that, but didn’t post because I don’t really know. Anyhow, thanks for posting the solution, as I’m sure that will help someone else out!