EZRate

راهنمای افزونهٔ «ویجت قیمت EZRate»

EZRate Price Widgets — guide

نصب، فعال‌سازی، ساخت ویجت، حالت‌ها و تنظیمات — قیمت دلار، طلا، سکه و ارز دیجیتال در سایت وردپرسی شما.

Install, activate, create widgets, all types and settings — dollar, gold, coin and crypto prices on your WordPress site.

۱نصب و فعال‌سازی

  1. در پیشخوان وردپرس به افزونه‌ها › افزودن بروید و «EZRate» را جستجو کنید؛ یا فایل zip افزونه را از بارگذاری افزونه نصب کنید.
  2. روی فعال‌سازی بزنید. منوی EZRate در ستون کناری پیشخوان اضافه می‌شود.
  3. یک ویجت «زیرنویس قیمت» آماده ساخته شده و قیمت‌ها در چند ثانیه دریافت می‌شوند. نیازی به ثبت‌نام، کلید API یا کد نیست.
قیمت‌ها روی سایت شما ذخیره و هر ۳۰ دقیقه در پس‌زمینه به‌روز می‌شوند؛ بازدیدکننده‌ها هیچ‌وقت منتظر سرور EZRate نمی‌مانند.

۲ساخت اولین ویجت

از EZRate › افزودن ویجت (یا ویرایش ویجت آماده) شروع کنید. صفحه دو بخش دارد: تنظیمات در سمت راست و پیش‌نمایش زنده در سمت چپ که با هر تغییر فوراً عوض می‌شود.

ویرایش ویجت
ویرایش ویجت: نوع، قیمت‌ها، نمایش و ظاهر با پیش‌نمایش زنده

بعد از ساخت ویجت، شورت‌کد آن (مثل [ezrate_widget id="2"]) زیر پیش‌نمایش نمایش داده می‌شود؛ با یک کلیک کپی می‌شود.

۳انواع ویجت

زیرنویس متحرکقیمت‌ها مثل زیرنویس خبری حرکت می‌کنند؛ با بردن ماوس متوقف می‌شود.
نوار قیمتیک ردیف ثابت قیمت؛ مناسب بالای سایت.
کارت قیمتکارت‌های مرتب با قیمت، واحد و درصد تغییر؛ ۱ تا ۶ ستون.
جدول قیمتنام، خرید، فروش و تغییر در یک جدول.
نمودارنمودار یک دارایی با بازهٔ روز، هفته، ماه و همه، کمترین و بیشترین.
ویجت‌ها در سایت فارسی
زیرنویس ثابت بالای سایت، کارت قیمت و نمودار دلار در یک سایت فارسی

۴انتخاب قیمت‌ها و ترتیب

  • در بخش قیمت‌ها روی هر ارز، طلا، سکه یا ارز دیجیتال کلیک کنید تا اضافه شود (دوباره کلیک = حذف). حداکثر ۲۰ قیمت.
  • ترتیب را با فلش‌های ↑ ↓ کنار هر مورد عوض کنید؛ × حذف می‌کند.
  • کادر جستجو با نام فارسی، انگلیسی یا کد (USD، G18…) کار می‌کند.
  • برای نمودار، دارایی و بازهٔ پیش‌فرض را انتخاب کنید؛ بازدیدکننده می‌تواند بازه را عوض کند.
قیمت ارزهای دیجیتال (به‌جز تتر) و انس جهانی به دلار و بقیه به تومان نمایش داده می‌شوند.

۵نمایش و محل قرارگیری

  • زبان ویجت: فارسی (راست‌به‌چپ با اعداد فارسی) یا انگلیسی؛ مستقل از زبان سایت.
  • پوسته: روشن یا تیره.
  • نمایش درصد تغییر ۲۴ ساعته، قیمت خرید، پرچم و آیکون، ساعت به‌روزرسانی و واحد پول.
  • سرعت زیرنویس (ثانیه برای هر دور) و تعداد ستون کارت‌ها.
  • برای زیرنویس و نوار قیمت، محل نمایش: جایی که شورت‌کد/بلوک را می‌گذارید، یا ثابت بالا / پایین همهٔ صفحه‌ها؛ با گزینهٔ «فقط صفحهٔ اصلی» و «در گوشی نمایش داده نشود».

۶رنگ و ظاهر

در بخش ظاهر رنگ پس‌زمینه، متن، متن کم‌رنگ، حاشیه، رنگ اصلی (دکمه‌ها)، افزایش و کاهش قیمت و خط نمودار را تعیین کنید. رنگی که خالی بماند از پوستهٔ روشن/تیره گرفته می‌شود. خط نمودار خالی = سبز یا قرمز بر اساس روند.

گردی گوشه‌ها (۰ تا ۲۸ پیکسل)، اندازهٔ متن (کوچک، متوسط، بزرگ) و فونت (همان فونت قالب یا فونت سیستم) هم قابل تنظیم است.

۷قرار دادن در سایت

ساده‌ترین راه: یک کلیک، بدون کد

بلافاصله بعد از فعال کردن افزونه، در پیشخوان پیامی با این دکمه‌ها می‌بینید (همین دکمه‌ها در صفحهٔ هر ابزارک، زیر «پیش‌نمایش زنده» هم هست):

  • نمایش بالای همهٔ صفحه‌های سایتم: زیرنویس قیمت بالای همهٔ صفحه‌ها ثابت می‌شود.
  • نمایش بالای همهٔ نوشته‌هایم: برای کارت، جدول و نمودار؛ بالای متن هر نوشته می‌آید.
  • افزودن به ستون کناری: در قالب‌های کلاسیک، ابزارک اول ستون کناری قرار می‌گیرد.
  • ساخت برگهٔ قیمت با این ابزارک: یک برگهٔ «قیمت لحظه‌ای ارز، طلا و سکه» منتشر می‌شود؛ بعد آن را به فهرست (منو) اضافه کنید.

یا در صفحهٔ ابزارک، بخش «کجا نمایش داده شود؟» یکی از گزینه‌ها (بالا یا پایین سایت، بالا یا پایین متن نوشته‌ها/برگه‌ها) را انتخاب و ذخیره کنید. فایل‌های قالب شما هیچ‌وقت تغییر نمی‌کند و هر کار برگشت‌پذیر است.

شورت‌کد

شورت‌کد را در نوشته، برگه، ابزارک «متن» یا صفحه‌سازها (المنتور، WPBakery…) بگذارید:

[ezrate_widget id="2"]

بلوک گوتنبرگ

در ویرایشگر بلوک، بلوک «ویجت قیمت EZRate» را اضافه و از ستون تنظیمات ویجت موردنظر را انتخاب کنید؛ پیش‌نمایش همان‌جا دیده می‌شود.

ابزارک کلاسیک

در قالب‌های کلاسیک: نمایش › ابزارک‌ها › «ویجت قیمت EZRate» را به ستون کناری اضافه و ویجت را انتخاب کنید.

فایل قالب

<?php echo do_shortcode( '[ezrate_widget id="2"]' ); ?>

ثابت بالا یا پایین سایت

برای زیرنویس و نوار قیمت، «ثابت بالای همهٔ صفحه‌ها» یا «ثابت پایین» را انتخاب کنید؛ نیازی به شورت‌کد نیست. فاصلهٔ لازم به بدنهٔ سایت اضافه می‌شود تا محتوا زیر نوار نرود.

فهرست ویجت‌ها
فهرست ویجت‌ها با شورت‌کد هر کدام (کلیک = کپی)

۸شورت‌کد سریع (بدون ساخت ویجت)

می‌توانید تنظیمات را مستقیم در شورت‌کد بنویسید؛ یا تنظیمات یک ویجت ذخیره‌شده را با id تغییر دهید:

[ezrate_widget type="cards" assets="usd,eur,g18,emami" lang="fa" theme="dark"]
[ezrate_widget id="2" theme="dark" columns="2"]
[ezrate_widget type="chart" chart_asset="g18" range="1m"]
ویژگیمقدار
typeticker، bar، cards، table، chart
assetsکد قیمت‌ها با کاما: usd,eur,aed,try,gbp,g18,g24,emami,nim,ounce,usdt,btc …
chart_asset / rangeدارایی نمودار و بازه: 1d، 7d، 1m، all
lang / themefa یا en / light یا dark
columns / speedستون کارت‌ها (۰ = خودکار) / ثانیهٔ هر دور زیرنویس

۹تنظیمات و به‌روزرسانی قیمت‌ها

تنظیمات
EZRate › تنظیمات
  • وضعیت قیمت‌ها: زمان آخرین دریافت و به‌روزرسانی بعدی. قیمت‌ها هر ۳۰ دقیقه (پلن رایگان داده) به‌روز می‌شوند.
  • به‌روزرسانی همین حالا: دریافت دستی (حداکثر هر ۵ دقیقه یک بار).
  • زبان ویجت‌های جدید.
  • لینک‌ها: لینک هر قیمت به صفحهٔ آن در ezrate.me و لینک کوچک «قیمت‌ها از EZRate». هر دو به‌طور پیش‌فرض خاموش‌اند؛ اگر روشن کنید از ما حمایت کرده‌اید. 🙏
  • حذف افزونه: اگر تیک خورده باشد، با حذف افزونه ویجت‌ها و تنظیمات هم پاک می‌شوند.
برای به‌روزرسانی دقیقه‌به‌دقیقه از ویجت‌های پنل کاربری EZRate (ezrate.me › ویجت‌ساز) استفاده کنید؛ این افزونه برای سرعت و سبکی، داده را هر ۳۰ دقیقه روی سایت شما ذخیره می‌کند.

۱۰سؤالات و رفع اشکال

قیمت‌ها نمایش داده نمی‌شوند

EZRate › تنظیمات را باز کنید: اگر خطا نوشته شده، سرور سایت باید به https://api.ezrate.me دسترسی HTTPS داشته باشد (فایروال هاست را بررسی کنید). سپس «به‌روزرسانی همین حالا» را بزنید. تا وقتی ارتباط برقرار نشود، آخرین قیمت‌های ذخیره‌شده نمایش داده می‌شوند.

با افزونه‌های کش سازگار است؟

بله. صفحهٔ کش‌شده قیمت لحظهٔ ساخت کش را نشان می‌دهد؛ مدت کش صفحه‌ها را ۳۰ دقیقه یا کمتر بگذارید.

کرون وردپرس غیرفعال است

اگر DISABLE_WP_CRON فعال است، کرون سرور باید wp-cron.php را اجرا کند؛ در غیر این صورت قیمت‌ها با اولین بازدید بعد از انقضا به‌روز می‌شوند.

حریم خصوصی

هیچ اطلاعاتی از بازدیدکننده‌ها ارسال نمی‌شود. فقط سرور سایت شما هر ۳۰ دقیقه قیمت‌ها را دریافت می‌کند؛ آیکون پرچم‌ها از ezrate.me بارگذاری می‌شود (قابل خاموش کردن در هر ویجت).

1Install and activate

  1. In your dashboard go to Plugins › Add New and search for "EZRate", or upload the plugin zip with Upload Plugin.
  2. Click Activate. An EZRate menu appears in the dashboard sidebar.
  3. A "Price ticker" widget is created for you and the prices are downloaded within seconds. No account, API key or code needed.
Prices are stored on your site and refreshed in the background every 30 minutes; your visitors never wait for the EZRate server.

2Your first widget

Start from EZRate › Add widget (or edit the ready-made one). The settings are on the left and the live preview on the right; it updates with every change.

Edit widget
Editing a widget: type, prices, display and style, with a live preview

After Create widget, its shortcode (e.g. [ezrate_widget id="2"]) is shown under the preview; click to copy it.

3Widget types

Moving tickerPrices scroll like a news ticker; pauses on hover.
Price barOne static row of prices, great for the top of a site.
Price cardsTidy cards with price, unit and change; 1–6 columns.
Price tableName, buy, sell and change.
ChartOne asset with day / week / month / all ranges, low and high.
Widgets on an English site
A price table, a dark chart with a custom line colour and a dark price bar

4Choosing prices and order

  • In Prices, click any currency, gold, coin or crypto to add it (click again to remove). Up to 20.
  • Change the order with the ↑ ↓ arrows; × removes it.
  • Search works with English or Persian names and codes (USD, G18…).
  • For a chart, pick the asset and the default range; visitors can switch ranges.
Crypto (except USDT) and the global gold ounce are shown in US dollars, everything else in Toman.

5Display and position

  • Widget language: Persian (right-to-left, Persian digits) or English — independent of the site language.
  • Theme: light or dark.
  • Show or hide the 24-hour change, the buy price, flags and icons, the update time and currency.
  • Ticker speed (seconds per loop) and the number of card columns.
  • For tickers and price bars, Where: where you place the shortcode / block, or fixed at the top / bottom of every page — optionally on the home page only and hidden on phones.

6Colours and style

In Style, set the background, text, secondary text, border, accent (buttons), price up / down and chart line colours. Empty colours come from the light / dark theme; an empty chart line is green or red by trend.

Style
Style options of a chart widget with a gold line

Also: corner radius (0–28 px), text size (small, medium, large) and font (your theme's or the system font).

7Placing a widget

Easiest: one click, no code

Right after activation a notice on your dashboard offers these buttons (they are also under the live preview of every widget):

  • Show at the top of my whole site — the ticker is fixed at the top of every page.
  • Show above all my posts — for cards, tables and charts: shown above the text of each post.
  • Add to my sidebar — classic themes: the widget goes to the top of the sidebar.
  • Create a prices page with it — publishes a "Live currency and gold prices" page; then add it to your menu.

Or choose Where should it appear? in the widget (top or bottom of the site, above or below the text of posts / pages) and save. Your theme files are never changed and everything can be undone.

Shortcode

Paste the shortcode into a post, page, a "Text" widget or a page builder (Elementor, WPBakery…):

[ezrate_widget id="2"]

Block editor

Add the "EZRate price widget" block and choose the widget in the block settings; the preview shows right in the editor.

Block
The block with its settings

Classic widget

In classic themes: Appearance › Widgets › add "EZRate price widget" to a sidebar and pick the widget.

Theme file

<?php echo do_shortcode( '[ezrate_widget id="2"]' ); ?>

Fixed at the top or bottom

For tickers and bars, choose "Fixed at the top of every page" or "…bottom"; no shortcode needed. The page gets the padding it needs so nothing is hidden under the bar.

Widget list
The widget list; click a shortcode to copy it

8Quick shortcode (no saved widget)

Write the options in the shortcode, or override a saved widget by id:

[ezrate_widget type="cards" assets="usd,eur,g18,emami" lang="en" theme="dark"]
[ezrate_widget id="2" theme="dark" columns="2"]
[ezrate_widget type="chart" chart_asset="g18" range="1m"]
AttributeValues
typeticker, bar, cards, table, chart
assetscomma-separated codes: usd,eur,aed,try,gbp,g18,g24,emami,nim,ounce,usdt,btc …
chart_asset / rangechart asset and range: 1d, 7d, 1m, all
lang / themefa or en / light or dark
columns / speedcard columns (0 = automatic) / seconds per ticker loop

9Settings and price updates

Settings
EZRate › Settings
  • Price status: time of the last download and of the next one. Prices refresh every 30 minutes (free data plan).
  • Refresh prices now: manual download (at most every 5 minutes).
  • Language of new widgets.
  • Links: link each price to its ezrate.me page, and a small "Rates by EZRate" credit. Both are off by default; turning them on supports the plugin. 🙏
  • Uninstall: when ticked, deleting the plugin also deletes the widgets and settings.
For minute-by-minute prices use the widgets of your EZRate account (ezrate.me › Widgets). This plugin stores the data on your site every 30 minutes to stay fast and light.

10FAQ and troubleshooting

No prices are shown

Open EZRate › Settings. If an error is shown, your server needs HTTPS access to https://api.ezrate.me (check the host's firewall). Then click "Refresh prices now". Until the connection works, the last saved prices are shown.

Page caching plugins

They work. A cached page shows the prices of the moment it was cached; keep the page cache lifetime at 30 minutes or less.

WP-Cron is disabled

With DISABLE_WP_CRON, a server cron job must call wp-cron.php; otherwise prices refresh on the first visit after they expire.

Privacy

Nothing about your visitors is sent. Only your server downloads the prices every 30 minutes; the flag icons load from ezrate.me (can be turned off per widget).