Among the millions of WordPress users who use Contact Form 7 (CF7), not everyone knows that you can add CF7 forms in WordPress Widgets as well as pages & posts. Also there are a couple of important things, to know about, to use them correctly.
In this article, we discuss how to add a Contact Form 7 form in a WordPress Widget.
Steps to add Contact Form 7 form in a Widget
WordPress gives you a Text widget option to add a CF7 form in your widgets easily. To add a CF7 form to your Text widget:
1. Go to Appearance >> Widgets,
or Customize >> Widgets.
2. Under the Available Widgets section, select Text widget.
3. Select where you want to add the widget.
4. In the Text widget, enter Title and paste your CF7 form shortcode in the textbox.
5. Click Save.
You can view your CF7 form once you save the Widget:
Warning – don’t use Custom HTML Widget
Currently, Contact Form 7 does not support adding a CF7 form into Custom HTML widgets.
If you add your CF7 shortcode in a Custom HTML widget, the widget does not display your form. Instead, it displays the CF7 shortcode.
Some CF7 users mistakenly add the CF7 form shortcode in a Custom HTML widget instead of a Text widget and face issues like the form not displaying.
- Can I place a contact form outside a post?
- Make sure the shortcode is included in a general Text widget