WP Manifestindependent plugin directory
manifest / utilities / gani-currency-rates

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

0stars
0forks

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.zip

A 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 Rates in 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

  1. Download this repository as a ZIP (Code → Download ZIP), or clone it.
  2. Make sure the top-level folder is named gani-currency-rates and zip that folder if it isn't already a .zip.
  3. In wp-admin: Plugins → Add New → Upload Plugin, choose the zip, click Install Now, then Activate.
  4. 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

  1. Go to Currency Rates → Currencies & Rates.
  2. Edit the Rate per 1 [BASE] field for any currency and click Save All Rates.
  3. To add a new currency, use the Add a New Currency form (code, name, 2-letter country code for the flag, and rate).
  4. Toggle the switch in the Enabled column to show/hide a currency without deleting it.
  5. 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) via wp_options — no custom database table needed.
  • Admin: includes/class-gani-cr-admin.php registers the dashboard page and handles form submissions (nonce-verified, capability-checked manage_options).
  • Front end: includes/class-gani-cr-shortcodes.php registers the two shortcodes and enqueues assets/css/style.css + assets/js/gani-cr.js only 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 scrollLeft via requestAnimationFrame, 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 LKR you'd use lk).

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 Yusuffnagoorgani.in.