YayCurrency Documentation
  • YayCurrency Documentation
  • Getting Started
    • Introduction
    • System Requirements
    • How to Install
    • Enter License key
    • How To Update YayCurrency
    • Uninstall and Delete
  • Main Features
  • Configurations
    • Manage Currency
    • Custom Rounding
    • Checkout Options
      • Hide estimated price at checkout
      • Hide checkout notice payment method
      • Force payment by customer country
      • Force Currency for Specific Payment Methods
    • Display Options
      • Use params on URL
      • Add A Few Parameters to Display Currency Switcher
    • Advanced Settings
      • Apply multiple currencies to Google Crawlers (or Bots)
      • Fixed Price for Each Currency Option for Bundle/Composite Product
    • Analytics
    • Order Info
    • Developer zone
      • Available YayCurrency Hooks
      • Available YayCurrency Shortcodes
  • Menu Option
  • Widget Option
  • Compatibility
    • Cache plugins
    • Dokan
    • YITH Points and Rewards
    • Name Your Price
    • Polylang
    • WPML
    • WooCommerce Subscriptions
    • Wholesale Pro by Barn2
    • WooCommerce Product Bundles
    • LearnPress
    • Lottery for WooCommerce
    • FunnelKit Automations
    • WordPress Tour & Travel Booking
    • B2B Market by MarketPress
    • Tiered Pricing Table for WooCommerce
    • Bookings Appointments for WooCommerce
    • Advanced Product Fields Extended
  • Why Upgrade?
  • OTHER LINKS
    • FAQs
    • Common Issues
    • Troubleshooting
      • How to pay without PayPal
    • Changelog
    • Support
Powered by GitBook
On this page
  • Step 1: Understanding the New Parameters
  • Step 2: Customizing the Switcher Appearance
  • Step 3: Check the Front-end

Was this helpful?

  1. Configurations
  2. Display Options

Add A Few Parameters to Display Currency Switcher

PreviousUse params on URLNextAdvanced Settings

Last updated 8 months ago

Was this helpful?

The improved [yaycurrency-switcher] shortcode introduces several new parameters that allow users to control the display of different elements of the currency switcher on their website.

Previously, when users entered the [yaycurrency-switcher] shortcode, they couldn't adjust the elements displayed on the switcher bar. However, after the improvements, users can now customize the display according to their preferences.

With new parameters like switcher_size, show_flag, show_name, show_symbol, show_code, and device, users can decide which elements to show or hide, such as the country flag, currency name, currency symbol, and currency code. They can also specify whether the switcher should appear on desktop, mobile, or both.

This update provides more flexibility and makes it easier to tailor the display to suit the needs of different websites, improving the overall user experience.

Step 1: Understanding the New Parameters

The improved [yaycurrency-switcher] shortcode introduces several new parameters that offer more granular control over the display of different elements on the currency switcher.

switcher_size: Defines the size of the currency switcher.

  • small

  • medium

  • large

show_flag: Controls whether the country flag of the currency is displayed.

  • yes to show the flag, no to hide it.

show_name: Determines whether the full name of the currency is shown.

  • yes to display the currency name, no to hide it.

show_symbol: Specifies whether the currency symbol (like $, €, £) is shown.

  • yes to display the symbol, no to hide it.

show_code: Indicates whether the currency code (e.g., USD, EUR) is shown.

  • yes to show the code, no to hide it.

device: Allows users to define on which devices the switcher will be displayed.

  • desktop to show on desktop only,

  • mobile to show on mobile devices only,

  • all to show on both desktop and mobile.

For example:

If you only want to display the country flag and currency symbol for all devices with a medium switcher size, you can use the following shortcode configuration:

[yaycurrency-switcher switcher_size="medium" show_flag="yes" show_name="no" show_symbol="yes" show_code="no" device="all"]

Step 2: Customizing the Switcher Appearance

This setup ensures that only the country flag and currency symbol are visible across all devices.

The [yaycurrency-switcher] shortcode provides flexibility in displaying currency information on your website. By using parameters, you can control which elements are shown and on which devices. This makes it easy to offer an optimized and user-friendly currency switcher for different platforms.

Step 3: Check the Front-end

  • For Desktop only: [yaycurrency-switcher switcher_size="medium" show_flag="yes" show_name="yes" show_symbol="yes" show_code="yes" device="desktop"]

  • For Mobile only: [yaycurrency-switcher switcher_size="small" show_flag="yes" show_name="no" show_symbol="no" show_code="yes" device="mobile"]

  • For Desktop & Mobile: [yaycurrency-switcher switcher_size="medium" show_flag="yes" show_name="yes" show_symbol="yes" show_code="yes" device="all"]