Embedding in WordPress
Add FavForm to your WordPress site using the block editor or classic editor.
Block Editor (Gutenberg)
The easiest way to add FavForm to WordPress:
Add a Custom HTML block
In the block editor, click the + button and search for "Custom HTML". Add it where you want the form.
Paste the embed code
Copy this code from your FavForm Publish step:
<fav-form data-embedId="your-form-id"></fav-form>
<script src="https://favform.com/embed/v1.js" async></script>Preview and publish
Click "Preview" in the block to see your form, then publish the page.
Classic Editor
If you're using the classic editor:
- Switch to the "Text" tab (not "Visual")
- Paste the embed code where you want the form
- Update or publish the page
Site-wide widgets
To add a feedback widget to every page, add the code to your theme's footer:
- Go to Appearance → Theme File Editor
- Select footer.php (or use a child theme)
- Add the widget code before the closing
</body>tag
<fav-form data-embedId="your-widget-id"></fav-form>
<script src="https://favform.com/embed/v1.js" async></script>Using shortcodes
Create a reusable shortcode by adding this to your theme's functions.php:
function favform_shortcode($atts) {
$atts = shortcode_atts(array(
'id' => '',
), $atts);
return '<fav-form data-embedId="' . esc_attr($atts['id']) . '"></fav-form>';
}
add_shortcode('favform', 'favform_shortcode');
// Add the FavForm SDK v1.0.0 script to footer
function favform_enqueue_script() {
wp_enqueue_script('favform-sdk', 'https://favform.com/embed/v1.js', array(), null, true);
}
add_action('wp_enqueue_scripts', 'favform_enqueue_script');Then use the shortcode in any post or page:
[favform id="your-form-id"]
[favform id="your-poll-id"]
[favform id="your-widget-id"]Iframe alternative
If custom HTML isn't working, use an iframe:
<iframe
src="https://favform.com/f/your-form-id"
width="100%"
height="600"
frameborder="0"
style="border: none;">
</iframe>Troubleshooting
Form not appearing
Make sure you're in the Text/HTML view, not Visual. Some page builders also strip scripts — try the iframe method instead.
Security plugins blocking scripts
Whitelist favform.com in your security plugin settings, or use the iframe embed method.
Caching issues
Clear your WordPress cache and CDN cache after adding the embed code.