Gani Currency Rate Converter & Marquee
Live currency rate converter and scrolling rates marquee for your site. Manage currencies & rates from the dashboard. Shortcodes: [gani_rate_converter] and [gani_rates_marquee].
by Nagoorgani Yusuff · github.com/nagoorgani/gani-currency-rates · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/nagoorgani/gani-currency-rates/archive/refs/heads/main.zipA lightweight WordPress plugin that adds a live currency rate converter and a scrolling "Today's Rate" ticker to any page, fully manageable from the WordPress dashboard — no code editing required.
Features
- 🎛️ Dashboard-managed rates — update any currency's rate from
Currency Ratesin wp-admin; changes appear on the front end instantly, no cache to clear (unless you run full-page caching). - 💱 Live converter widget — visitor types an amount, picks a target currency, and the result updates instantly via JavaScript (no page reload, no API calls).
- 🎟️ Auto-scrolling rates ticker — a continuously scrolling card row showing every enabled currency's rate, with manual prev/next arrows and pause-on-hover.
- ➕ Add/remove currencies freely — not locked to a fixed list. Add any currency with a code, name, 2-letter country flag code, and rate.
- 🎨 On/off + ordering controls — enable/disable any currency without deleting it, and control display order.
- 🖌️ Theming — change the base currency, heading/subheading copy, footnote, and two accent colors from Display Settings, no CSS editing needed.
- 🔌 Shortcode-based — drop
[gani_rate_converter]and[gani_rates_marquee]into any page, post, widget, or page builder shortcode block.
Screenshots
| Converter | Ticker |
|---|---|
| Gradient card with live amount → rate conversion | Auto-scrolling rate cards with flags |
(Add your own screenshots to a /assets or /.github folder and link them here once installed on your site.)
Installation
- Download this repository as a ZIP (
Code → Download ZIP), or clone it. - Make sure the top-level folder is named
gani-currency-ratesand zip that folder if it isn't already a.zip. - In wp-admin: Plugins → Add New → Upload Plugin, choose the zip, click Install Now, then Activate.
- A new Currency Rates menu item appears in the left-hand dashboard menu.
Installing via WP-CLI
wp plugin install /path/to/gani-currency-rates.zip --activate
Installing via Git (for development)
cd wp-content/plugins
git clone https://github.com/<your-username>/gani-currency-rates.git
wp plugin activate gani-currency-rates
Usage
Shortcodes
| Shortcode | Description |
|---|---|
[gani_rate_converter] |
Live converter card only. |
[gani_rates_marquee] |
Auto-scrolling rate cards only. |
[gani_rate_converter show_marquee="yes"] |
Converter + ticker stacked together, matching the reference design. |
Paste any of these into a Page/Post via the Shortcode block, or into any widget/page-builder shortcode element (Elementor, Divi, etc.).
Managing rates
- Go to Currency Rates → Currencies & Rates.
- Edit the Rate per 1 [BASE] field for any currency and click Save All Rates.
- To add a new currency, use the Add a New Currency form (code, name, 2-letter country code for the flag, and rate).
- Toggle the switch in the Enabled column to show/hide a currency without deleting it.
- Use the Order column to control left-to-right display order.
Display settings
Go to Currency Rates → Display Settings to change:
- Base currency (code, name, flag) — defaults to
AED - Converter heading / subheading / footnote text
- The two accent colors used for the gradient card
Default currencies
Pre-loaded on activation (all editable/removable): INR, PHP, PKR, NPR, LKR, EGP, UGX, KES — base currency AED.
How it works (technical overview)
- Storage: currencies and settings are stored as two WordPress options (
gani_cr_currencies,gani_cr_settings) viawp_options— no custom database table needed. - Admin:
includes/class-gani-cr-admin.phpregisters the dashboard page and handles form submissions (nonce-verified, capability-checkedmanage_options). - Front end:
includes/class-gani-cr-shortcodes.phpregisters the two shortcodes and enqueuesassets/css/style.css+assets/js/gani-cr.jsonly on pages that use them. - Conversion math happens entirely client-side in
gani-cr.js— the enabled currency list and rates are passed to the browser once per page load, so typing an amount updates the result with zero network requests. - Ticker duplicates the rate cards once in the markup and animates
scrollLeftviarequestAnimationFrame, resetting seamlessly once it scrolls past one full set — giving a smooth infinite loop that pauses on hover or when using the arrows. - Flags are loaded from flagcdn.com using the 2-letter country code you assign to each currency (not the currency code — e.g. for
LKRyou'd uselk).
File structure
gani-currency-rates/
├── gani-currency-rates.php # Plugin bootstrap
├── includes/
│ ├── class-gani-cr-data.php # Storage / defaults
│ ├── class-gani-cr-admin.php # Dashboard page + form handling
│ ├── admin-page-view.php # Dashboard HTML template
│ └── class-gani-cr-shortcodes.php # Shortcode rendering + asset enqueueing
├── assets/
│ ├── css/
│ │ ├── style.css # Front-end styles
│ │ └── admin.css # Dashboard styles
│ └── js/
│ ├── gani-cr.js # Converter math + ticker animation
│ └── admin.js # Dashboard tabs + delete confirmation
└── readme.txt # WordPress.org-style readme
Requirements
- WordPress 5.0+
- PHP 7.4+
- No external PHP dependencies
Roadmap / ideas
- [ ] Optional REST endpoint to update rates programmatically (e.g. from a cron job pulling a live FX API)
- [ ] Per-shortcode override of which currencies to display
- [ ] Gutenberg block wrapper for both shortcodes
Contributions and issues welcome.
License
GPLv2 or later — same as WordPress itself.
Author
Built by Nagoorgani Yusuff — nagoorgani.in.