RumX Widget for Your Website
Add trusted rum ratings, reviews, and tasting guidance to your online shop, blog, or website — and help your visitors pick the right bottle. Free, no API key or account needed.
Why Add the RumX Widget
Build trust
Show real community ratings backed by 283,000+ tasting notes from rum enthusiasts
Help customers decide
Highlight top reviews and tasting impressions so visitors pick the right bottle
Guide every palate
The "Perfect for" section shows who will enjoy each rum, from beginners to experts
Always up to date
Ratings and reviews sync automatically, no manual updates needed
Lightweight
The widget loads asynchronously and won't slow down your page
Free, no limits
No API key, no account required, no usage caps
Code Generator
Platform Integration Guides
Step-by-step instructions for the most popular platforms. The widget works on any website that supports custom HTML.
Add the RumX widget to your Shopify product pages using a Custom Liquid block.
- 1.Open your product page template
Go to Online Store → Themes → Customize, then open your product page template. - 2.Add a Custom Liquid block
In the product page section, click "Add block" and select "Custom Liquid". Paste the widget code into the Liquid field. - 3.Use this Liquid code for automatic EAN-based integration
This snippet automatically reads the product barcode (EAN) from Shopify and passes it to the widget — no manual RXID needed per product.
{%- assign ean = product.selected_or_first_available_variant.barcode -%}
{%- if ean != blank -%}
<div class="rumx-widget"
data-ean="{{ ean }}"
data-lang="en">
<a href="https://rumx.com/en/rums/">RumX Rum Rating</a>
</div>
<script src="https://rumx.com/api/widget/v1/embed.js"></script>
{%- endif -%}Tip: Make sure your Shopify products have a barcode (EAN) set under the "Inventory" section. The widget will automatically look up the matching rum.
Add the RumX widget to WooCommerce product pages. You can paste the code per product, or use a PHP snippet for automatic integration.
- 1.Per-product: paste into a Custom HTML block
Edit a product, switch to the "Text" tab in the description editor, and paste your widget HTML snippet. - 2.Automatic: add a PHP snippet to your theme
Add the following code to your theme's functions.php or a code snippets plugin. It automatically reads the GTIN/EAN field (available in WooCommerce 9.2+) and renders the widget on every product page.
// Add to functions.php or a code snippets plugin
add_action('woocommerce_single_product_summary', function() {
global $product;
$ean = $product->get_global_unique_id(); // WooCommerce 9.2+
if (!$ean) return;
echo '<div class="rumx-widget" data-ean="' . esc_attr($ean) . '" data-lang="en">';
echo '<a href="https://rumx.com/en/rums/">RumX Rum Rating</a>';
echo '</div>';
echo '<script src="https://rumx.com/api/widget/v1/embed.js"></script>';
}, 35);Tip: WooCommerce 9.2+ has a built-in GTIN field under Product data → Inventory. For older versions, you can use a plugin like "EAN for WooCommerce" to add EAN fields.
Add the RumX widget to any WordPress post or page using the block editor.
- 1.Add a Custom HTML block
In the WordPress block editor, add a "Custom HTML" block and paste your widget snippet. - 2.Optional: create a reusable shortcode
Add this PHP snippet to your theme's functions.php to create a [rumx_widget] shortcode you can use anywhere.
// Add to functions.php
function rumx_widget_shortcode($atts) {
$atts = shortcode_atts(['rxid' => '', 'ean' => '', 'lang' => 'en'], $atts);
$id_attr = $atts['ean'] ? 'data-ean="' . esc_attr($atts['ean']) . '"'
: 'data-rxid="' . esc_attr($atts['rxid']) . '"';
return '<div class="rumx-widget" ' . $id_attr . ' data-lang="' . esc_attr($atts['lang']) . '">'
. '<a href="https://rumx.com/en/rums/">RumX Rum Rating</a></div>'
. '<script src="https://rumx.com/api/widget/v1/embed.js"></script>';
}
add_shortcode('rumx_widget', 'rumx_widget_shortcode');Tip: Use the shortcode like [rumx_widget rxid="313"] or [rumx_widget ean="8024564013387"] in any post or page.
The widget works on any website — just paste the HTML snippet wherever you want it to appear.
- 1.Paste the snippet into your HTML
Copy the generated code from above and paste it into your page's HTML where you want the widget to appear. - 2.That's it
The script loads asynchronously and renders the widget automatically. No build step or framework integration needed.
SPA: Using a Single Page Application (React, Vue, Angular)? The embed script includes a MutationObserver that detects dynamically added widget elements. Just insert the div into the DOM and it will render automatically.
Configuration Reference
Customize the widget using these data attributes on the widget div.
| Attribute | Values | Default | Description |
|---|---|---|---|
data-rxid | Number | — | The RumX ID of the rum to display. Find it on any rum page on rumx.com. |
data-ean | Number | — | Look up a rum by its EAN/barcode instead of RXID. Useful for automatic shop integrations. |
data-shopify-id | Number | — | Look up a rum by its Shopify product or variant ID (for Shopify partner shops). |
data-lang | en, de, fr | en | Display language for the widget interface. |
data-variant | full, badge | full | Widget layout variant. "full" shows the complete widget, "badge" shows a compact rating badge. |
data-reviews | true, false | true | Show or hide the review excerpts section (full variant only). |
data-perfect-for | true, false | true | Show or hide the "Perfect for" tasting guidance section (full variant only). |
data-theme | light, dark | light | Color theme. Use "dark" on dark backgrounds. |