Skip to main content

How to integrate a bsport widget on WordPress

Step-by-step guide to embedding a bsport widget on a WordPress site, covering the block editor, page builders, and code snippet plugins.

Before you start

Generate your widget code in the bsport back office: Settings > Widgets, choose the widget type, configure your options, then scroll down and copy the code. Every time you change a setting a new code is generated, and you have to paste the new version onto your site for the change to take effect.
​

Method 1 — Custom HTML block (recommended)

For the standard WordPress block editor:

  1. Edit the page where you want the widget

  2. Click + to add a block and search for HTML

  3. Paste your widget code into the block

  4. Update the page

Method 2 — Page builders

  • Elementor: choose an HTML element, drag onto the page and paste the code into it.

  • Divi: add a Code module and paste the code there.

  • WPBakery: add a Raw HTML element.

In each case the principle is the same: use the element designed for raw HTML, not a text or rich-text element, which will strip the script tags.
​

Method 3 — Site-wide via a code snippet plugin

Use when your theme or security setup prevents scripts in page content.

  1. Install a code snippet plugin such as WPCode or Code Snippets

  2. Create a new snippet set to run in the site footer

  3. Paste your widget code and activate it.

  4. Copy the shortcode that appears below:

  5. Go to the page where you want to have the widget and choose the element shortcode. Paste and save.

Avoid editing theme files directly through Appearance > Theme File Editor. Changes there are lost the next time your theme updates.
​

Troubleshooting

The code disappears after saving. A security plugin (Wordfence, Sucuri) or your user role is stripping script tags. Administrators can normally insert scripts; editors and authors often cannot. If you are an administrator and it still happens, use a code snippet plugin instead.
​

The widget shows old information, or changes are not appearing. Clear your caching plugin (WP Rocket, W3 Total Cache, LiteSpeed) and any CDN cache such as Cloudflare. Caching is the most common cause of a WordPress site showing an outdated version of a page.
​

Changes made in the back office are not showing. Separate from caching: the configuration does not update automatically on your site. Copy the newly generated code and replace the old one entirely.
​

The widget looks different from the back-office preview. Your theme's stylesheet may be affecting it. Enable Compatibility Mode in your widget settings, then copy and paste the new code.
​

The widget appears twice. Check it has not been added both to the page content and to a site-wide snippet.
​

Nothing appears at all. Open the page in a private browsing window to rule out caching, then confirm the code is still present in the block — some editors silently remove scripts when a page is re-saved from a different editing mode.
​

​Still stuck? Contact our support team with the page URL and a screenshot, and we'll take a look.

Did this answer your question?