Simple HubSpot Forms Integration
Simple HubSpot Forms Integration WordPress Plugin
by Thomas McMahon · github.com/twistermc/simple-hubspot-wp · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/twistermc/simple-hubspot-wp/archive/refs/heads/main.zipReadme
Simple HubSpot Forms Integration WordPress Plugin
A lightweight WordPress plugin that allows you to easily embed HubSpot forms into your WordPress pages and posts using shortcodes.
This plugin can replace the official HubSpot plugin if you want something more lightweight. It'll work with the same shortcodes, just deactivate the official plugin and activate this one. There are no HubSpot integrations other than embedding a form.
Installation
- Download the plugin files
- Upload the
hubspot-formsfolder to your/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
Usage
Use the shortcode [hubspot] in your posts or pages to embed a HubSpot form. The shortcode accepts two parameters:
id(required): The HubSpot Form IDportal(required): Your HubSpot Portal ID
Example
[hubspot portal="12345678" id="nrd5c5e0-6f2f-46b1-95d7-aacb3975e9df"]
Finding Your Form and Portal IDs
- In HubSpot, navigate to Marketing → Forms
- Find your form, but don't click on it
- Click the "Actions" button
- In the embed code, you'll find both your Portal ID and Form ID
Features
- Simple shortcode implementation
- Respects HubSpot cookies
- Unique container IDs for multiple forms on the same page
- Secure output with WordPress escaping functions
Styling
- The forms are wrapped in a
simple-hubspot-formclass. If you're using legacy forms in HubSpot, you can use this class to style your forms. If using HubSpot's new editor, you'll have to style your forms in HubSpot.
Requirements
- WordPress 4.0 or higher
- Active HubSpot account
License
This plugin is licensed under GPL v2 or later.