Description
Show today’s verified gold rates on your WordPress site with a clean, lightweight widget. Rates are fetched from BaKhabar Pakistan’s verified data pipeline — cross-checked against APGJSA (Sarafa Association) and the State Bank of Pakistan.
Features:
* Live 24K, 22K, 21K gold rates per tola
* Light and dark theme options
* Sidebar widget + shortcode support
* Optional attribution credit link (off by default)
* 15-minute smart caching (no API overload)
* Graceful fallback if API is temporarily unavailable
* Responsive design
* Zero configuration required — just activate and use
Usage:
As a shortcode in any post or page:
[bakhabar_gold]
With options:
[bakhabar_gold theme=”dark” show_22k=”yes” show_21k=”no” show_credit=”yes”]
As a widget: Go to Appearance Widgets add “BaKhabar Gold Rates” to any sidebar.
External Services
This plugin connects to the BaKhabar Pakistan API to fetch live gold rates for Pakistan. BaKhabar Pakistan is owned and operated by the plugin author (Muhammad Awais Rashid, ACMA).
BaKhabar Pakistan Gold Rates API
- Service: BaKhabar Pakistan (bakhabarpakistan.com)
- Endpoint:
https://bakhabarpakistan.com/en/finance/gold-rates/api/ - Data sent: No user data is collected or transmitted. The plugin makes a read-only GET request to retrieve current gold rates (24K, 22K, 21K per tola) and the verification status.
- When: Each time the widget or shortcode is displayed, if the locally cached data (15-minute cache) has expired. No data is sent on every page load.
- Terms of Service: https://bakhabarpakistan.com/pages/terms/
- Privacy Policy: https://bakhabarpakistan.com/pages/privacy-policy/
Installation
- Download the plugin zip file
- Go to WordPress Admin Plugins Add New Upload Plugin
- Upload the zip file and click “Install Now”
- Activate the plugin
- Use the shortcode
[bakhabar_gold]or add the widget from Appearance Widgets
FAQ
-
Where does the data come from?
-
Gold rates are fetched from BaKhabar Pakistan (bakhabarpakistan.com), which verifies rates against APGJSA and the State Bank of Pakistan’s M2M exchange rate.
-
How often does the data update?
-
The plugin caches data for 15 minutes. BaKhabar Pakistan updates rates 4 times daily during Sarafa market hours (10AM, 1PM, 4PM, 7PM PKT).
-
Does this slow down my site?
-
No. The plugin caches API responses for 15 minutes using WordPress transients. Your database is hit once every 15 minutes, not on every page load.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“BaKhabar Gold Rates” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “BaKhabar Gold Rates” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.0
- Initial release
- Live gold rates from BaKhabar Pakistan API
- Widget + shortcode support
- Light/dark themes
- Optional credit link (off by default)
- 15-minute smart caching
- Deactivation cleanup