Gold price widget for WordPress
A free live gold and silver price block for any WordPress site — no plugin required, although an official one exists.
Live preview
Paste anywhere in your HTML. Works on every CMS that allows iframes.
<iframe src="/embed?metals=gold%2Csilver¤cy=EUR&unit=g&theme=light&accent=B8860B&style=card&size=m&lang=en"
width="320" height="174"
loading="lazy" style="border:0" scrolling="no"
title="Live gold and silver prices"></iframe>
<a href="https://metalflowapi.com/gold-price-api/eur" target="_blank" rel="noopener">Prices by MetalflowAPI</a>Two minutes, three steps
Configure the widget above — metals, currency, gram or ounce pricing, light or dark theme and your brand colour — then open the WordPress tab and copy the snippet. In the WordPress editor, click the plus button, search for Custom HTML, paste, and preview. That is the whole installation. Because the embed is a plain iframe, nothing in your theme or plugin stack can conflict with it, and updating WordPress will never break it.
For sidebars and footers, go to Appearance → Widgets and drop a Custom HTML widget into the area you want. Narrow columns look best with the ticker layout at size S; a sidebar in a jewellery shop usually looks best with the card layout showing gold and silver per gram.
Page builders and classic themes
Elementor users can use the HTML widget, Divi users the Code module, Beaver Builder users the HTML module, and WPBakery users the Raw HTML element. On classic themes you can also paste the snippet straight into a template file. If your site uses a caching plugin such as WP Rocket or LiteSpeed Cache, no exclusions are needed: the widget is loaded in its own frame and refreshes itself independently of your page cache, so visitors never see a stale gold price even when the surrounding HTML is cached for hours.
Performance notes
The frame is a few kilobytes and ships no fonts, no jQuery and no tracking. It is marked as lazily loaded, so it only fetches once it approaches the viewport, keeping Largest Contentful Paint and Total Blocking Time untouched. Prices are rendered server-side, which means the number is present in the frame's initial HTML rather than appearing after a client-side request. If you want full control over the markup instead, use the MetalflowAPI REST API directly from a small plugin or a server-side snippet.
Need raw data?
Build your own dashboards, pricing tools or checkout logic with the MetalflowAPI gold price API — live and historical prices for gold, silver, platinum and palladium in 10+ currencies.
Frequently asked questions
- How do I add a gold price widget to WordPress?
- Edit your page, add a Custom HTML block, paste the iframe code generated on this page and publish. No plugin is required.
- Can I put the widget in a sidebar or footer?
- Yes. In Appearance → Widgets add a Custom HTML widget to any widget area and paste the same code. The ticker layout is a good fit for narrow footers.
- Does it work with Elementor, Divi or block themes?
- Yes. Use Elementor's HTML widget, Divi's Code module, or a Custom HTML block in the site editor. The embed is a standard iframe.
- Is there an official WordPress plugin?
- Yes, MetalflowAPI publishes a plugin at metalflowapi.com/wordpress if you would rather use a shortcode than paste HTML.