Add A Few Parameters to Display Currency Switcher
Last updated
Last updated
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.
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"]
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.
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"]