On a self-hosted WordPress site, you need the Administrator or Editor role. On a WordPress multisite network, only a Super Admin can add the code. On WordPress.com, you need a paid plan with hosting features activated. On other plans, WordPress.com removes the code when you save.
In SnapWidget
- Create your widget, or open an existing widget from your dashboard.
- Click Get Widget. For an existing widget, click Update & Get Widget.
- In the You’re One Step Away window, click Copy To Clipboard.
In WordPress
- In your WordPress dashboard, click Pages or Posts. Open the page or post where you want the widget.
- Click the Block Inserter (+) at the place where you want the widget. Search for “Custom HTML” and select Custom HTML. You can also type
/htmlin an empty line. - Click Edit HTML. Paste your code and click Update. In WordPress versions before 7.0, paste the code straight into the block.
- Save or publish the page.
Add the widget to a sidebar or footer
- Classic theme: go to Appearance > Widgets. Open the widget area, click + and add a Custom HTML block. Paste your code and click Update.
- Block theme: go to Appearance > Editor > Patterns. Under Template Parts, open the part you want, for example Footer, and click the pencil icon. Add a Custom HTML block, paste your code and click Save.